Browse Source

if selected, always make targets 'test' and 'testprof/$(LIBTEST)'

Steffen Jaeckel 11 years ago
parent
commit
757ac982a5
6 changed files with 12 additions and 1 deletions
  1. 2 0
      makefile
  2. 2 0
      makefile.icc
  3. 3 1
      makefile.mingw
  4. 1 0
      makefile.msvc
  5. 2 0
      makefile.shared
  6. 2 0
      makefile.unix

+ 2 - 0
makefile

@@ -287,6 +287,7 @@ library: $(LIBNAME)
 
 
 $(OBJECTS): $(HEADERS)
 $(OBJECTS): $(HEADERS)
 
 
+.PHONY: testprof/$(LIBTEST)
 testprof/$(LIBTEST):
 testprof/$(LIBTEST):
 	cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) CC="$(CC)" LD="$(LD)" AR="$(AR)" RANLIB="$(RANLIB)" $(MAKE)
 	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)
 timing: library testprof/$(LIBTEST) $(TIMINGS)
 	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 
 
+.PHONY: test
 test: library testprof/$(LIBTEST) $(TESTS)
 test: library testprof/$(LIBTEST) $(TESTS)
 	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 
 

+ 2 - 0
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.
 #This rule makes the libtomcrypt library.
 library: $(LIBNAME)
 library: $(LIBNAME)
 
 
+.PHONY: testprof/$(LIBTEST)
 testprof/$(LIBTEST):
 testprof/$(LIBTEST):
 	cd testprof ; LIBTEST_S=$(LIBTEST) CFLAGS="$(CFLAGS)" CC="$(CC)" AR="$(AR)" $(MAKE) -f makefile.icc
 	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)
 timing: library $(TIMINGS) testprof/$(LIBTEST)
 	$(CC) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 	$(CC) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 
 
+.PHONY: test
 test: library $(TESTS) testprof/$(LIBTEST)
 test: library $(TESTS) testprof/$(LIBTEST)
 	$(CC) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 	$(CC) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 
 

+ 3 - 1
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.
 #This rule makes the libtomcrypt library.
 library: $(LIBNAME)
 library: $(LIBNAME)
 
 
+.PHONY: testprof/$(LIBTEST)
 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)
 	$(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)
 timing: library testprof/$(LIBTEST) $(TIMINGS)
 	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 
 
+.PHONY: test
 test: library testprof/$(LIBTEST) $(TESTS)
 test: library testprof/$(LIBTEST) $(TESTS)
 	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 
 
@@ -251,4 +253,4 @@ install_test: testprof/$(LIBTEST)
 
 
 clean:
 clean:
 	cmd /c del /Q /S *.o *.a *.exe
 	cmd /c del /Q /S *.o *.a *.exe
-	$(MAKE) -C testprof -f makefile.mingw clean
+	$(MAKE) -C testprof -f makefile.mingw clean

+ 1 - 0
makefile.msvc

@@ -158,6 +158,7 @@ tv_gen: demos/tv_gen.c library
 hashsum: demos/hashsum.c library
 hashsum: demos/hashsum.c library
 	cl $(CFLAGS) demos/hashsum.c tomcrypt.lib advapi32.lib $(EXTRALIBS)
 	cl $(CFLAGS) demos/hashsum.c tomcrypt.lib advapi32.lib $(EXTRALIBS)
 
 
+.PHONY: test
 test: demos/test.c library
 test: demos/test.c library
 	cl $(CFLAGS) demos/test.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS)
 	cl $(CFLAGS) demos/test.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS)
 
 

+ 2 - 0
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.
 #This rule makes the libtomcrypt library.
 library: $(LIBNAME)
 library: $(LIBNAME)
 
 
+.PHONY: testprof/$(LIBTEST)
 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
 	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)
 tv_gen: library $(TVS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TV) $(TVS) $(LIBNAME) $(EXTRALIBS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TV) $(TVS) $(LIBNAME) $(EXTRALIBS)
 
 
+.PHONY: test
 test: library testprof/$(LIBTEST) $(TESTS)
 test: library testprof/$(LIBTEST) $(TESTS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 
 

+ 2 - 0
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.
 #This rule makes the libtomcrypt library.
 library: $(LIBNAME)
 library: $(LIBNAME)
 
 
+.PHONY: testprof/$(LIBTEST)
 testprof/$(LIBTEST):
 testprof/$(LIBTEST):
 	cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) $(MAKE)
 	cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) $(MAKE)
 
 
@@ -236,6 +237,7 @@ multi: library $(MULTIS)
 timing: library testprof/$(LIBTEST) $(TIMINGS)
 timing: library testprof/$(LIBTEST) $(TIMINGS)
 	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 
 
+.PHONY: test
 test: library testprof/$(LIBTEST) $(TESTS)
 test: library testprof/$(LIBTEST) $(TESTS)
 	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)