Partially revert "don't include testprof for library build"

This partially reverts commit 3a1cbcfee2a16d15167876423b6ca720458e801a.
This commit is contained in:
Steffen Jaeckel 2017-05-08 18:09:45 +02:00
parent 794a416715
commit 0cd9e94736
2 changed files with 4 additions and 27 deletions

View File

@ -25,7 +25,7 @@ CFLAGS = -O2 -DUSE_LTM -DLTM_DESC -I../libtommath
EXTRALIBS = -L../libtommath -ltommath EXTRALIBS = -L../libtommath -ltommath
#Compilation flags #Compilation flags
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -DLTC_SOURCE LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itestprof -DLTC_SOURCE
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS) LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
#Libraries to be created #Libraries to be created
@ -201,16 +201,6 @@ src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_ma
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \ src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
src/headers/tomcrypt_prng.h src/headers/tomcrypt_prng.h
THEADERS != ls testprof/*.h
#List of demo objects (only used to create a special rule to extend LTC_CFLAGS)
DSOURCES != ls demos/*.c
DOBJECTS = ${DSOURCES:.c=.o}
#SPECIAL: demo- and test-objects required include-path "testprof"
$(DOBJECTS): LTC_CFLAGS += -Itestprof
$(TOBJECTS): LTC_CFLAGS += -Itestprof
.c.o: .c.o:
$(CC) $(LTC_CFLAGS) -c $< -o $@ $(CC) $(LTC_CFLAGS) -c $< -o $@
@ -230,11 +220,9 @@ src/hashes/sha2/sha512_224.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_22
src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c
src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
#Dependencies on *.h #Dependencies on *.h
$(OBJECTS): $(HEADERS) $(OBJECTS): $(HEADERS)
$(DOBJECTS): $(HEADERS) $(THEADERS) $(TOBJECTS): $(HEADERS) testprof/tomcrypt_test.h
$(TOBJECTS): $(HEADERS) $(THEADERS)
#Create libtomcrypt_prof.a #Create libtomcrypt_prof.a
$(LIBTEST_S): $(TOBJECTS) $(LIBTEST_S): $(TOBJECTS)

View File

@ -32,7 +32,7 @@ CFLAGS = -O2 -DUSE_LTM -DLTM_DESC -I../libtommath
EXTRALIBS = ../libtommath/libtommath.a EXTRALIBS = ../libtommath/libtommath.a
#Compilation flags #Compilation flags
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -DLTC_SOURCE LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itestprof -DLTC_SOURCE
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS) LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
VERSION=1.17 VERSION=1.17
@ -207,8 +207,6 @@ src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_ma
src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \ src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
src/headers/tomcrypt_prng.h src/headers/tomcrypt_prng.h
THEADERS != ls testprof/*.h
#The default rule for make builds the libtomcrypt.a library (static) #The default rule for make builds the libtomcrypt.a library (static)
default: library default: library
@ -225,21 +223,12 @@ src/hashes/sha2/sha512_224.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_22
src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c
src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
#List of demo objects (only used to create a special rule to extend LTC_CFLAGS)
DSOURCES != ls demos/*.c
DOBJECTS = ${DSOURCES:.c=.o}
#This rule makes the libtomcrypt library. #This rule makes the libtomcrypt library.
library: $(LIBMAIN_S) library: $(LIBMAIN_S)
#Dependencies on *.h #Dependencies on *.h
$(OBJECTS): $(HEADERS) $(OBJECTS): $(HEADERS)
$(DOBJECTS): $(HEADERS) $(THEADERS) $(TOBJECTS): $(HEADERS) testprof/tomcrypt_test.h
$(TOBJECTS): $(HEADERS) $(THEADERS)
#SPECIAL: demo- and test-objects required include-path "testprof"
$(DOBJECTS): LTC_CFLAGS += -Itestprof
$(TOBJECTS): LTC_CFLAGS += -Itestprof
#This is necessary for compatibility with BSD make (namely on OpenBSD) #This is necessary for compatibility with BSD make (namely on OpenBSD)
.SUFFIXES: .o .c .SUFFIXES: .o .c