From 757ac982a5f61a0b9a363cf526c2dfa1876e7a81 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 6 Aug 2014 15:14:45 +0200 Subject: [PATCH] if selected, always make targets 'test' and 'testprof/$(LIBTEST)' --- makefile | 2 ++ makefile.icc | 2 ++ makefile.mingw | 4 +++- makefile.msvc | 1 + makefile.shared | 2 ++ makefile.unix | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index dea1ea2..c775d55 100644 --- a/makefile +++ b/makefile @@ -287,6 +287,7 @@ library: $(LIBNAME) $(OBJECTS): $(HEADERS) +.PHONY: testprof/$(LIBTEST) testprof/$(LIBTEST): cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) CC="$(CC)" LD="$(LD)" AR="$(AR)" RANLIB="$(RANLIB)" $(MAKE) @@ -315,6 +316,7 @@ multi: library $(MULTIS) timing: library testprof/$(LIBTEST) $(TIMINGS) $(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING) +.PHONY: test test: library testprof/$(LIBTEST) $(TESTS) $(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST) diff --git a/makefile.icc b/makefile.icc index 6d5a4d2..23ef4a3 100644 --- a/makefile.icc +++ b/makefile.icc @@ -273,6 +273,7 @@ src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c #This rule makes the libtomcrypt library. library: $(LIBNAME) +.PHONY: testprof/$(LIBTEST) testprof/$(LIBTEST): cd testprof ; LIBTEST_S=$(LIBTEST) CFLAGS="$(CFLAGS)" CC="$(CC)" AR="$(AR)" $(MAKE) -f makefile.icc @@ -298,6 +299,7 @@ tv_gen: library $(TVS) timing: library $(TIMINGS) testprof/$(LIBTEST) $(CC) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING) +.PHONY: test test: library $(TESTS) testprof/$(LIBTEST) $(CC) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST) diff --git a/makefile.mingw b/makefile.mingw index 8fd3a22..2893aa2 100644 --- a/makefile.mingw +++ b/makefile.mingw @@ -208,6 +208,7 @@ src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c #This rule makes the libtomcrypt library. library: $(LIBNAME) +.PHONY: testprof/$(LIBTEST) testprof/$(LIBTEST): $(MAKE) -C testprof -f makefile.mingw CFLAGS_OPTS="$(CFLAGS)" LIBTEST_S=$(LIBTEST) CC=$(CC) LD=$(LD) AR=$(AR) ARFLAGS=$(ARFLAGS) RANLIB=$(RANLIB) @@ -236,6 +237,7 @@ multi: library $(MULTIS) timing: library testprof/$(LIBTEST) $(TIMINGS) $(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING) +.PHONY: test test: library testprof/$(LIBTEST) $(TESTS) $(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST) @@ -251,4 +253,4 @@ install_test: testprof/$(LIBTEST) clean: cmd /c del /Q /S *.o *.a *.exe - $(MAKE) -C testprof -f makefile.mingw clean \ No newline at end of file + $(MAKE) -C testprof -f makefile.mingw clean diff --git a/makefile.msvc b/makefile.msvc index afb1ad6..aabe8eb 100644 --- a/makefile.msvc +++ b/makefile.msvc @@ -158,6 +158,7 @@ tv_gen: demos/tv_gen.c library hashsum: demos/hashsum.c library cl $(CFLAGS) demos/hashsum.c tomcrypt.lib advapi32.lib $(EXTRALIBS) +.PHONY: test test: demos/test.c library cl $(CFLAGS) demos/test.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS) diff --git a/makefile.shared b/makefile.shared index 18fe826..734506c 100644 --- a/makefile.shared +++ b/makefile.shared @@ -258,6 +258,7 @@ src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c #This rule makes the libtomcrypt library. library: $(LIBNAME) +.PHONY: testprof/$(LIBTEST) testprof/$(LIBTEST): cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) LT=$(LT) CC=$(CC) make -f makefile.shared @@ -295,6 +296,7 @@ small: library $(SMALLOBJECTS) tv_gen: library $(TVS) $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TV) $(TVS) $(LIBNAME) $(EXTRALIBS) +.PHONY: test test: library testprof/$(LIBTEST) $(TESTS) $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) diff --git a/makefile.unix b/makefile.unix index 9e2a645..91af9b1 100644 --- a/makefile.unix +++ b/makefile.unix @@ -208,6 +208,7 @@ src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c #This rule makes the libtomcrypt library. library: $(LIBNAME) +.PHONY: testprof/$(LIBTEST) testprof/$(LIBTEST): cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) $(MAKE) @@ -236,6 +237,7 @@ multi: library $(MULTIS) timing: library testprof/$(LIBTEST) $(TIMINGS) $(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING) +.PHONY: test test: library testprof/$(LIBTEST) $(TESTS) $(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)