make testapps after the library.
[openssl.git] / crypto / Makefile.ssl
index 3c4b9574dc816d270235db144a29b632427873f5..17caee18fad5d38bde916e6f471d86f1fac4ad48 100644 (file)
@@ -20,7 +20,7 @@ AR=           ar r
 PEX_LIBS=
 EX_LIBS=
  
-CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS="\"$(CC) $(CFLAG)\"" -DPLATFORM="\"$(PLATFORM)\""
+CFLAGS= $(INCLUDE) $(CFLAG)
 
 
 LIBS=
@@ -40,17 +40,26 @@ LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o cpt_err.o
 SRC= $(LIBSRC)
 
 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h
-HEADER=        cryptlib.h date.h $(EXHEADER)
+HEADER=        cryptlib.h buildinf.h $(EXHEADER)
 
 ALL=    $(GENERAL) $(SRC) $(HEADER)
 
 top:
        @(cd ..; $(MAKE) DIRS=$(DIR) all)
 
-all: date.h lib subdirs
+all: buildinf.h lib subdirs
 
-date.h: ../Makefile.ssl
-       echo "#define DATE \"`date`\"" >date.h
+buildinf.h: ../Makefile.ssl
+       ( echo "#ifndef MK1MF_BUILD"; \
+       echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
+       echo "  #define CFLAGS \"$(CC) $(CFLAG)\""; \
+       echo "  #define PLATFORM \"$(PLATFORM)\""; \
+       echo "  #define DATE \"`date`\""; \
+       echo "#endif" ) >buildinf.h
+
+testapps:
+       (cd des && make des)
+       (cd pkcs7 && make testapps)
 
 subdirs:
        @for i in $(SDIRS) ;\
@@ -117,7 +126,9 @@ lint:
        done;
 
 depend:
+       if [ ! -e buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
        $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
+       if [ ! -s buildinf.h ]; then rm buildinf.h; fi
        @for i in $(SDIRS) ;\
        do \
        (cd $$i; echo "making depend in crypto/$$i..."; \
@@ -125,7 +136,7 @@ depend:
        done;
 
 clean:
-       rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+       rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
        @for i in $(SDIRS) ;\
        do \
        (cd $$i; echo "making clean in crypto/$$i..."; \
@@ -149,12 +160,12 @@ cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
 cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-cryptlib.o: ../include/openssl/stack.h cryptlib.h date.h
+cryptlib.o: ../include/openssl/stack.h cryptlib.h
 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
 cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h
 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-cversion.o: ../include/openssl/stack.h cryptlib.h date.h
+cversion.o: ../include/openssl/stack.h buildinf.h cryptlib.h
 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
 ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h