remove tomcrypt_prof test-only library

This commit is contained in:
Steffen Jaeckel 2017-06-05 15:51:29 +02:00
parent 201681ee3b
commit 07ffa0f1a2
9 changed files with 34 additions and 81 deletions

View File

@ -15,9 +15,9 @@ fi
CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" make -j$MAKE_JOBS -f $3 all_test 1>gcc_1.txt 2>gcc_2.txt CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" make -j$MAKE_JOBS -f $3 all_test 1>gcc_1.txt 2>gcc_2.txt
mret=$? mret=$?
cnt=$(wc -l < gcc_2.txt) cnt=$(wc -l < gcc_2.txt)
# ignore 2 lines since ar prints to stderr instead of stdout and ar is called for # ignore 1 line since ar prints to stderr instead of stdout and ar is called for
# $(LIBNAME) and testprof/$(LIBTEST_S) # $(LIBNAME)
if [[ $mret -ne 0 ]] || [[ $cnt -gt 2 ]]; then if [[ $mret -ne 0 ]] || [[ $cnt -gt 1 ]]; then
echo "build $1 failed! printing gcc_2.txt now for convenience" echo "build $1 failed! printing gcc_2.txt now for convenience"
cat gcc_2.txt cat gcc_2.txt
exit 1 exit 1

View File

@ -239,7 +239,7 @@ sub process_makefiles {
my @all = (); my @all = ();
find({ no_chdir => 1, wanted => sub { push @all, $_ if -f $_ && $_ =~ /\.(c|h)$/ } }, 'src'); find({ no_chdir => 1, wanted => sub { push @all, $_ if -f $_ && $_ =~ /\.(c|h)$/ } }, 'src');
my @t = qw(); my @t = qw();
find({ no_chdir => 1, wanted => sub { push @t, $_ if $_ =~ /(common|no_prng|_tests?).c$/ } }, 'testprof'); find({ no_chdir => 1, wanted => sub { push @t, $_ if $_ =~ /(common|no_prng|_tests?|test).c$/ } }, 'testprof');
my @o = sort ('src/ciphers/aes/aes_enc.o', map { my $x = $_; $x =~ s/\.c$/.o/; $x } @c); my @o = sort ('src/ciphers/aes/aes_enc.o', map { my $x = $_; $x =~ s/\.c$/.o/; $x } @c);
my $var_o = prepare_variable("OBJECTS", @o); my $var_o = prepare_variable("OBJECTS", @o);

View File

@ -27,9 +27,6 @@ INSTALL_CMD = install
ifndef LIBNAME ifndef LIBNAME
LIBNAME=libtomcrypt.a LIBNAME=libtomcrypt.a
endif endif
ifndef LIBTEST
LIBTEST=libtomcrypt_prof.a
endif
include makefile_include.mk include makefile_include.mk
@ -61,27 +58,17 @@ ifneq ($V,1)
endif endif
${silent} $(RANLIB) $@ ${silent} $(RANLIB) $@
$(LIBTEST): $(TOBJECTS)
ifneq ($V,1)
@echo " * ${AR} $@"
endif
${silent} $(AR) $(ARFLAGS) $@ $(TOBJECTS)
ifneq ($V,1)
@echo " * ${RANLIB} $@"
endif
${silent} $(RANLIB) $@
timing: $(LIBNAME) $(TIMINGS) testprof/common.o timing: $(LIBNAME) $(TIMINGS) testprof/common.o
ifneq ($V,1) ifneq ($V,1)
@echo " * ${CC} $@" @echo " * ${CC} $@"
endif endif
${silent} $(CC) $(LDFLAGS) $(TIMINGS) testprof/common.o $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TIMING) ${silent} $(CC) $(LDFLAGS) $(TIMINGS) testprof/common.o $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TIMING)
test: $(LIBNAME) $(LIBTEST) $(TESTS) test: $(LIBNAME) $(TOBJECTS)
ifneq ($V,1) ifneq ($V,1)
@echo " * ${CC} $@" @echo " * ${CC} $@"
endif endif
${silent} $(CC) $(LDFLAGS) $(TESTS) $(LIBTEST) $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TEST) ${silent} $(CC) $(LDFLAGS) $(TOBJECTS) $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TEST)
# build the demos from a template # build the demos from a template
define DEMO_template define DEMO_template
@ -102,8 +89,6 @@ install: .common_install
install_bins: .common_install_bins install_bins: .common_install_bins
install_test: .common_install_test
profile: profile:
CFLAGS="$(CFLAGS) -fprofile-generate" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov" CFLAGS="$(CFLAGS) -fprofile-generate" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
./timing ./timing

View File

@ -33,7 +33,6 @@ VERSION=1.17
LIBMAIN_S =libtomcrypt.a LIBMAIN_S =libtomcrypt.a
LIBMAIN_I =libtomcrypt.dll.a LIBMAIN_I =libtomcrypt.dll.a
LIBMAIN_D =libtomcrypt.dll LIBMAIN_D =libtomcrypt.dll
LIBTEST_S =libtomcrypt_prof.a
#List of objects to compile (all goes to libtomcrypt.a) #List of objects to compile (all goes to libtomcrypt.a)
OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \ OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \
@ -193,7 +192,7 @@ testprof/dh_test.o testprof/dsa_test.o testprof/ecc_test.o testprof/file_test.o
testprof/mac_test.o testprof/misc_test.o testprof/modes_test.o testprof/multi_test.o testprof/no_prng.o \ testprof/mac_test.o testprof/misc_test.o testprof/modes_test.o testprof/multi_test.o testprof/no_prng.o \
testprof/pkcs_1_eme_test.o testprof/pkcs_1_emsa_test.o testprof/pkcs_1_oaep_test.o \ testprof/pkcs_1_eme_test.o testprof/pkcs_1_emsa_test.o testprof/pkcs_1_oaep_test.o \
testprof/pkcs_1_pss_test.o testprof/pkcs_1_test.o testprof/rotate_test.o testprof/rsa_test.o \ testprof/pkcs_1_pss_test.o testprof/pkcs_1_test.o testprof/rotate_test.o testprof/rsa_test.o \
testprof/store_test.o testprof/store_test.o testprof/test.o
#The following headers will be installed by "make install" #The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
@ -225,11 +224,6 @@ $(TOBJECTS): $(HEADERS) testprof/tomcrypt_test.h
.c.o: .c.o:
$(CC) $(LTC_CFLAGS) -c $< -o $@ $(CC) $(LTC_CFLAGS) -c $< -o $@
#Create libtomcrypt_prof.a
$(LIBTEST_S): $(TOBJECTS)
$(AR) $(ARFLAGS) $@ $(TOBJECTS)
$(RANLIB) $@
#Create libtomcrypt.a #Create libtomcrypt.a
$(LIBMAIN_S): $(OBJECTS) $(LIBMAIN_S): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
@ -252,13 +246,13 @@ tv_gen: demos/tv_gen.o testprof/common.o $(LIBMAIN_S)
#Tests + timing tests #Tests + timing tests
timing.exe: demos/timing.o testprof/common.o $(LIBMAIN_S) timing.exe: demos/timing.o testprof/common.o $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) demos/timing.o testprof/common.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
@echo NOTICE: start the tests by: timing.exe @echo NOTICE: start the tests by: timing.exe
test.exe: demos/test.o $(LIBTEST_S) $(LIBMAIN_S) test.exe: $(TOBJECTS) $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
@echo NOTICE: start the tests by: test.exe @echo NOTICE: start the tests by: test.exe
all: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) $(LIBTEST_S) hashsum.exe ltcrypt.exe small.exe tv_gen.exe timing.exe test.exe all: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) hashsum.exe ltcrypt.exe small.exe tv_gen.exe timing.exe test.exe
test: test.exe test: test.exe
@ -267,7 +261,7 @@ clean:
@cmd /c del /Q /S *.o *.a *.exe *.dll 2>nul @cmd /c del /Q /S *.o *.a *.exe *.dll 2>nul
#Install the library + headers #Install the library + headers
install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) $(LIBTEST_S) install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D)
cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin" cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin"
cmd /c if not exist "$(DESTDIR)\lib" mkdir "$(DESTDIR)\lib" cmd /c if not exist "$(DESTDIR)\lib" mkdir "$(DESTDIR)\lib"
cmd /c if not exist "$(DESTDIR)\include" mkdir "$(DESTDIR)\include" cmd /c if not exist "$(DESTDIR)\include" mkdir "$(DESTDIR)\include"

View File

@ -26,7 +26,6 @@ VERSION=1.17
#Libraries to be created (this makefile builds only static libraries) #Libraries to be created (this makefile builds only static libraries)
LIBMAIN_S =tomcrypt.lib LIBMAIN_S =tomcrypt.lib
LIBTEST_S =tomcrypt_prof.lib
#List of objects to compile (all goes to tomcrypt.lib) #List of objects to compile (all goes to tomcrypt.lib)
OBJECTS=src/ciphers/aes/aes.obj src/ciphers/aes/aes_enc.obj src/ciphers/anubis.obj src/ciphers/blowfish.obj \ OBJECTS=src/ciphers/aes/aes.obj src/ciphers/aes/aes_enc.obj src/ciphers/anubis.obj src/ciphers/blowfish.obj \
@ -186,7 +185,7 @@ testprof/dh_test.obj testprof/dsa_test.obj testprof/ecc_test.obj testprof/file_t
testprof/mac_test.obj testprof/misc_test.obj testprof/modes_test.obj testprof/multi_test.obj testprof/no_prng.obj \ testprof/mac_test.obj testprof/misc_test.obj testprof/modes_test.obj testprof/multi_test.obj testprof/no_prng.obj \
testprof/pkcs_1_eme_test.obj testprof/pkcs_1_emsa_test.obj testprof/pkcs_1_oaep_test.obj \ testprof/pkcs_1_eme_test.obj testprof/pkcs_1_emsa_test.obj testprof/pkcs_1_oaep_test.obj \
testprof/pkcs_1_pss_test.obj testprof/pkcs_1_test.obj testprof/rotate_test.obj testprof/rsa_test.obj \ testprof/pkcs_1_pss_test.obj testprof/pkcs_1_test.obj testprof/rotate_test.obj testprof/rsa_test.obj \
testprof/store_test.obj testprof/store_test.obj testprof/test.obj
#The following headers will be installed by "make install" #The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
@ -218,10 +217,6 @@ $(TOBJECTS): $(HEADERS) testprof/tomcrypt_test.h
.c.obj: .c.obj:
$(CC) $(LTC_CFLAGS) /c $< /Fo$@ $(CC) $(LTC_CFLAGS) /c $< /Fo$@
#Create tomcrypt_prof.lib
$(LIBTEST_S): $(TOBJECTS)
lib /out:$(LIBTEST_S) $(TOBJECTS)
#Create tomcrypt.lib #Create tomcrypt.lib
$(LIBMAIN_S): $(OBJECTS) $(LIBMAIN_S): $(OBJECTS)
lib /out:$(LIBMAIN_S) $(OBJECTS) lib /out:$(LIBMAIN_S) $(OBJECTS)
@ -237,12 +232,12 @@ tv_gen.exe: demos/tv_gen.c $(LIBMAIN_S)
cl $(LTC_CFLAGS) demos/tv_gen.c $(LIBMAIN_S) $(LTC_LDFLAGS) cl $(LTC_CFLAGS) demos/tv_gen.c $(LIBMAIN_S) $(LTC_LDFLAGS)
#Tests + timing tests #Tests + timing tests
timing.exe: demos/timing.c $(LIBMAIN_S) $(LIBTEST_S) timing.exe: demos/timing.c $(LIBMAIN_S)
cl $(LTC_CFLAGS) demos/timing.c $(LIBTEST_S) $(LIBMAIN_S) $(LTC_LDFLAGS) cl $(LTC_CFLAGS) demos/timing.c $(LIBMAIN_S) $(LTC_LDFLAGS)
test.exe: demos/test.c $(LIBMAIN_S) $(LIBTEST_S) test.exe: $(LIBMAIN_S) $(TOBJECTS)
cl $(LTC_CFLAGS) demos/test.c $(LIBTEST_S) $(LIBMAIN_S) $(LTC_LDFLAGS) cl $(LTC_CFLAGS) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS)
all: $(LIBMAIN_S) $(LIBTEST_S) hashsum.exe ltcrypt.exe small.exe tv_gen.exe timing.exe test.exe all: $(LIBMAIN_S) hashsum.exe ltcrypt.exe small.exe tv_gen.exe timing.exe test.exe
test: test.exe test: test.exe
@ -251,7 +246,7 @@ clean:
@cmd /c del /Q /S *.OBJ *.LIB *.EXE *.DLL 2>nul @cmd /c del /Q /S *.OBJ *.LIB *.EXE *.DLL 2>nul
#Install the library + headers #Install the library + headers
install: $(LIBMAIN_S) $(LIBTEST_S) install: $(LIBMAIN_S)
cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin" cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin"
cmd /c if not exist "$(DESTDIR)\lib" mkdir "$(DESTDIR)\lib" cmd /c if not exist "$(DESTDIR)\lib" mkdir "$(DESTDIR)\lib"
cmd /c if not exist "$(DESTDIR)\include" mkdir "$(DESTDIR)\include" cmd /c if not exist "$(DESTDIR)\include" mkdir "$(DESTDIR)\include"

View File

@ -18,9 +18,6 @@ LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
INSTALL_CMD = $(LT) --mode=install install INSTALL_CMD = $(LT) --mode=install install
#Output filenames for various targets. #Output filenames for various targets.
ifndef LIBTEST
LIBTEST=libtomcrypt_prof.la
endif
ifndef LIBNAME ifndef LIBNAME
LIBNAME=libtomcrypt.la LIBNAME=libtomcrypt.la
endif endif
@ -39,9 +36,6 @@ src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
$(LIBNAME): $(OBJECTS) $(LIBNAME): $(OBJECTS)
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./src -type f -name "*.lo" | LC_ALL=C sort` $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT) $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./src -type f -name "*.lo" | LC_ALL=C sort` $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT)
$(LIBTEST): $(TOBJECTS)
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./testprof -type f -name "*.lo" | LC_ALL=C sort` -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT)
install: .common_install install: .common_install
sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
install -d $(LIBPATH)/pkgconfig install -d $(LIBPATH)/pkgconfig
@ -49,13 +43,11 @@ install: .common_install
install_bins: .common_install_bins install_bins: .common_install_bins
install_test: .common_install_test test: $(LIBNAME) $(TOBJECTS)
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
test: $(LIBNAME) $(LIBTEST) $(TESTS)
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS)
timing: $(TIMINGS) testprof/common.o $(LIBNAME) timing: $(TIMINGS) testprof/common.o $(LIBNAME)
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $? $(EXTRALIBS) $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $^ $(EXTRALIBS)
# build the demos from a template # build the demos from a template
define DEMO_template define DEMO_template

View File

@ -38,7 +38,6 @@ VERSION=1.17
#Libraries to be created (this makefile builds only static libraries) #Libraries to be created (this makefile builds only static libraries)
LIBMAIN_S =libtomcrypt.a LIBMAIN_S =libtomcrypt.a
LIBTEST_S =libtomcrypt_prof.a
#List of objects to compile (all goes to libtomcrypt.a) #List of objects to compile (all goes to libtomcrypt.a)
OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \ OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \
@ -198,7 +197,7 @@ testprof/dh_test.o testprof/dsa_test.o testprof/ecc_test.o testprof/file_test.o
testprof/mac_test.o testprof/misc_test.o testprof/modes_test.o testprof/multi_test.o testprof/no_prng.o \ testprof/mac_test.o testprof/misc_test.o testprof/modes_test.o testprof/multi_test.o testprof/no_prng.o \
testprof/pkcs_1_eme_test.o testprof/pkcs_1_emsa_test.o testprof/pkcs_1_oaep_test.o \ testprof/pkcs_1_eme_test.o testprof/pkcs_1_emsa_test.o testprof/pkcs_1_oaep_test.o \
testprof/pkcs_1_pss_test.o testprof/pkcs_1_test.o testprof/rotate_test.o testprof/rsa_test.o \ testprof/pkcs_1_pss_test.o testprof/pkcs_1_test.o testprof/rotate_test.o testprof/rsa_test.o \
testprof/store_test.o testprof/store_test.o testprof/test.o
#The following headers will be installed by "make install" #The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
@ -232,11 +231,6 @@ $(TOBJECTS): $(HEADERS) testprof/tomcrypt_test.h
.c.o: .c.o:
$(CC) $(LTC_CFLAGS) -c $< -o $@ $(CC) $(LTC_CFLAGS) -c $< -o $@
#Create libtomcrypt_prof.a
$(LIBTEST_S): $(TOBJECTS)
$(AR) $(ARFLAGS) $@ $(TOBJECTS)
$(RANLIB) $@
#Create libtomcrypt.a #Create libtomcrypt.a
$(LIBMAIN_S): $(OBJECTS) $(LIBMAIN_S): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
@ -244,28 +238,28 @@ $(LIBMAIN_S): $(OBJECTS)
#Demo tools/utilities #Demo tools/utilities
hashsum: demos/hashsum.o testprof/common.o $(LIBMAIN_S) hashsum: demos/hashsum.o testprof/common.o $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) demos/hashsum.o testprof/common.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
ltcrypt: demos/ltcrypt.o testprof/common.o $(LIBMAIN_S) ltcrypt: demos/ltcrypt.o testprof/common.o $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) demos/ltcrypt.o testprof/common.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
small: demos/small.o testprof/common.o $(LIBMAIN_S) small: demos/small.o testprof/common.o $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) demos/small.o testprof/common.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
tv_gen: demos/tv_gen.o testprof/common.o $(LIBMAIN_S) tv_gen: demos/tv_gen.o testprof/common.o $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) demos/tv_gen.o testprof/common.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
#Tests + timing tests #Tests + timing tests
timing: demos/timing.o testprof/common.o $(LIBMAIN_S) timing: demos/timing.o $(LIBMAIN_S) testprof/common.o
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) demos/timing.o $(LIBMAIN_S) testprof/common.o $(LTC_LDFLAGS) -o $@
@echo "NOTICE: start the timing tests by: ./timing" @echo "NOTICE: start the timing tests by: ./timing"
test: demos/test.o $(LIBTEST_S) $(LIBMAIN_S) test: $(TOBJECTS) $(LIBMAIN_S)
$(CC) $? $(LTC_LDFLAGS) -o $@ $(CC) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
@echo "NOTICE: start the tests by: ./test" @echo "NOTICE: start the tests by: ./test"
all: $(LIBMAIN_S) $(LIBTEST_S) hashsum ltcrypt small tv_gen timing test all: $(LIBMAIN_S) hashsum ltcrypt small tv_gen timing test
#NOTE: this makefile works also on cygwin, thus we need to delete *.exe #NOTE: this makefile works also on cygwin, thus we need to delete *.exe
clean: clean:
-@rm -f $(OBJECTS) $(TOBJECTS) -@rm -f $(OBJECTS) $(TOBJECTS)
-@rm -f $(LIBMAIN_S) $(LIBTEST_S) -@rm -f $(LIBMAIN_S)
-@rm -f demos/*.o *_tv.txt -@rm -f demos/*.o *_tv.txt
-@rm -f test tv_gen hashsum crypt small timing -@rm -f test tv_gen hashsum crypt small timing
-@rm -f test.exe tv_gen.exe hashsum.exe crypt.exe small.exe timing.exe -@rm -f test.exe tv_gen.exe hashsum.exe crypt.exe small.exe timing.exe

View File

@ -113,7 +113,6 @@ UNBROKEN_DEMOS=$(USEFUL_DEMOS) ltcrypt small tv_gen sizes constants
DEMOS=$(UNBROKEN_DEMOS) openssl-enc DEMOS=$(UNBROKEN_DEMOS) openssl-enc
TIMINGS=demos/timing.o TIMINGS=demos/timing.o
TESTS=demos/test.o
#LIBPATH The directory for libtomcrypt to be installed to. #LIBPATH The directory for libtomcrypt to be installed to.
#INCPATH The directory to install the header files for libtomcrypt. #INCPATH The directory to install the header files for libtomcrypt.
@ -296,7 +295,7 @@ testprof/dh_test.o testprof/dsa_test.o testprof/ecc_test.o testprof/file_test.o
testprof/mac_test.o testprof/misc_test.o testprof/modes_test.o testprof/multi_test.o testprof/no_prng.o \ testprof/mac_test.o testprof/misc_test.o testprof/modes_test.o testprof/multi_test.o testprof/no_prng.o \
testprof/pkcs_1_eme_test.o testprof/pkcs_1_emsa_test.o testprof/pkcs_1_oaep_test.o \ testprof/pkcs_1_eme_test.o testprof/pkcs_1_emsa_test.o testprof/pkcs_1_oaep_test.o \
testprof/pkcs_1_pss_test.o testprof/pkcs_1_test.o testprof/rotate_test.o testprof/rsa_test.o \ testprof/pkcs_1_pss_test.o testprof/pkcs_1_test.o testprof/rotate_test.o testprof/rsa_test.o \
testprof/store_test.o testprof/store_test.o testprof/test.o
# The following headers will be installed by "make install" # The following headers will be installed by "make install"
HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \
@ -354,12 +353,6 @@ install_all: install install_bins install_docs install_test
install -d $(BINPATH) install -d $(BINPATH)
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(BINPATH) $(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(BINPATH)
.common_install_test: $(LIBTEST)
install -d $(LIBPATH)
install -d $(INCPATH)
install -m 644 testprof/tomcrypt_test.h $(INCPATH)
$(INSTALL_CMD) -m 644 $(LIBTEST) $(LIBPATH)
install_docs: doc/crypt.pdf install_docs: doc/crypt.pdf
install -d $(DATAPATH) install -d $(DATAPATH)
install -m 644 doc/crypt.pdf $(DATAPATH) install -m 644 doc/crypt.pdf $(DATAPATH)