Makefile revision 279265
19535Sstsmirno# 211833Sctornqvi# OpenSSL/crypto/Makefile 39535Sstsmirno# 49535Sstsmirno 59535SstsmirnoDIR= crypto 69535SstsmirnoTOP= .. 79535SstsmirnoCC= cc 89535SstsmirnoINCLUDE= -I. -I$(TOP) -I../include 99535Sstsmirno# INCLUDES targets sudbirs! 109535SstsmirnoINCLUDES= -I.. -I../.. -I../../include 119535SstsmirnoCFLAG= -g 129535SstsmirnoMAKEDEPPROG= makedepend 139535SstsmirnoMAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) 149535SstsmirnoMAKEFILE= Makefile 159535SstsmirnoRM= rm -f 169535SstsmirnoAR= ar r 179535Sstsmirno 189535SstsmirnoRECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \ 199535Sstsmirno (cd $$i && echo "making $$target in $(DIR)/$$i..." && \ 209535Sstsmirno $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='${INCLUDES}' $$target ) || exit 1; \ 219535Sstsmirno done; 229535Sstsmirno 239535SstsmirnoPEX_LIBS= 249535SstsmirnoEX_LIBS= 259535Sstsmirno 269535SstsmirnoCFLAGS= $(INCLUDE) $(CFLAG) 279535SstsmirnoASFLAGS= $(INCLUDE) $(ASFLAG) 289535SstsmirnoAFLAGS=$(ASFLAGS) 299535Sstsmirno 309535SstsmirnoLIBS= 319535Sstsmirno 329535SstsmirnoGENERAL=Makefile README crypto-lib.com install.com 339535SstsmirnoTEST=constant_time_test.c 349535Sstsmirno 359535SstsmirnoLIB= $(TOP)/libcrypto.a 369535SstsmirnoSHARED_LIB= libcrypto$(SHLIB_EXT) 379535SstsmirnoLIBSRC= cryptlib.c dyn_lck.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c o_init.c fips_err.c 3811477SlmesnikLIBOBJ= cryptlib.o dyn_lck.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o o_init.o fips_err.o $(CPUID_OBJ) 3911098Sdsamersoff 4011833SctornqviSRC= $(LIBSRC) 419535Sstsmirno 429535SstsmirnoEXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \ 439535Sstsmirno ossl_typ.h 449535SstsmirnoHEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h \ 459535Sstsmirno constant_time_locl.h $(EXHEADER) 469535Sstsmirno 479535SstsmirnoALL= $(GENERAL) $(SRC) $(HEADER) 489535Sstsmirno 499535Sstsmirnotop: 509535Sstsmirno @(cd ..; $(MAKE) DIRS=$(DIR) all) 519535Sstsmirno 529535Sstsmirnoall: lib 539535Sstsmirno 549535Sstsmirnobuildinf.h: ../Makefile 559535Sstsmirno ( echo "#ifndef MK1MF_BUILD"; \ 569535Sstsmirno echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \ 579535Sstsmirno echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \ 589535Sstsmirno echo ' #define PLATFORM "$(PLATFORM)"'; \ 599535Sstsmirno echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ 609535Sstsmirno echo '#endif' ) >buildinf.h 619535Sstsmirno 629535Sstsmirnox86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl 639535Sstsmirno $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@ 649535Sstsmirnox86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl 659535Sstsmirno $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@ 669535Sstsmirnox86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl 679535Sstsmirno $(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@ 689535Sstsmirno 699535Sstsmirnouplink.o: ../ms/uplink.c 709535Sstsmirno $(CC) $(CFLAGS) -c -o $@ ../ms/uplink.c 719535Sstsmirno 729535Sstsmirnouplink-cof.s: ../ms/uplink.pl 739535Sstsmirno $(PERL) ../ms/uplink.pl coff > $@ 749535Sstsmirno 759535Sstsmirnox86_64cpuid.s: x86_64cpuid.pl 769535Sstsmirno $(PERL) x86_64cpuid.pl $@ 779535Sstsmirnoia64cpuid.s: ia64cpuid.S 789535Sstsmirno $(CC) $(CFLAGS) -E ia64cpuid.S > $@ 799535Sstsmirno 809535Sstsmirnotestapps: 819535Sstsmirno [ -z "$(THIS)" ] || ( if echo ${SDIRS} | fgrep ' des '; \ 829535Sstsmirno then cd des && $(MAKE) -e des; fi ) 839535Sstsmirno [ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) -e testapps ); 849535Sstsmirno @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi 859535Sstsmirno 869535Sstsmirnosubdirs: 879535Sstsmirno @target=all; $(RECURSIVE_MAKE) 889535Sstsmirno 899535Sstsmirnofiles: 909535Sstsmirno $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 919535Sstsmirno @target=files; $(RECURSIVE_MAKE) 929535Sstsmirno 939535Sstsmirnolinks: 949535Sstsmirno @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) 959535Sstsmirno @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST) 969535Sstsmirno @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS) 979535Sstsmirno @target=links; $(RECURSIVE_MAKE) 989535Sstsmirno 999535Sstsmirno# lib: and $(LIB): are splitted to avoid end-less loop 1009535Sstsmirnolib: buildinf.h $(LIB) subdirs 1019535Sstsmirno @touch lib 1029535Sstsmirno$(LIB): $(LIBOBJ) 1039535Sstsmirno $(ARX) $(LIB) $(LIBOBJ) 1049535Sstsmirno $(RANLIB) $(LIB) || echo Never mind. 1059535Sstsmirno 1069535Sstsmirnoshared: buildinf.h lib subdirs 1079535Sstsmirno if [ -n "$(SHARED_LIBS)" ]; then \ 1089535Sstsmirno (cd ..; $(MAKE) $(SHARED_LIB)); \ 1099535Sstsmirno fi 1109535Sstsmirno 1119535Sstsmirnolibs: 1129535Sstsmirno @target=lib; $(RECURSIVE_MAKE) 1139535Sstsmirno 1149535Sstsmirnoinstall: 1159535Sstsmirno @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... 1169535Sstsmirno @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ 1179535Sstsmirno do \ 1189535Sstsmirno (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ 1199535Sstsmirno chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ 120 done; 121 @target=install; $(RECURSIVE_MAKE) 122 123lint: 124 @target=lint; $(RECURSIVE_MAKE) 125 126depend: 127 @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist 128 @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC) 129 @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h 130 @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) ) 131 @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi 132 133clean: 134 rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff 135 @target=clean; $(RECURSIVE_MAKE) 136 137dclean: 138 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 139 mv -f Makefile.new $(MAKEFILE) 140 @target=dclean; $(RECURSIVE_MAKE) 141 142# DO NOT DELETE THIS LINE -- make depend depends on it. 143 144cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h 145cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h 146cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h 147cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 148cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h 149cpt_err.o: ../include/openssl/symhacks.h cpt_err.c 150cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 151cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 152cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h 153cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 154cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 155cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c 156cryptlib.o: cryptlib.h 157cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 158cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 159cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h 160cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 161cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 162cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h 163cversion.o: cryptlib.h cversion.c 164dyn_lck.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 165dyn_lck.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 166dyn_lck.o: ../include/openssl/err.h ../include/openssl/lhash.h 167dyn_lck.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 168dyn_lck.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 169dyn_lck.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h 170dyn_lck.o: dyn_lck.c 171ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c 172ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 173ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 174ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h 175ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 176ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 177ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h 178ex_data.o: ex_data.c 179fips_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h 180fips_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h 181fips_err.o: ../include/openssl/fips.h ../include/openssl/lhash.h 182fips_err.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 183fips_err.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 184fips_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h fips_err.c 185fips_err.o: fips_err.h 186mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 187mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 188mem.o: ../include/openssl/err.h ../include/openssl/lhash.h 189mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 190mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 191mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h 192mem.o: mem.c 193mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 194mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 195mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 196mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c 197mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 198mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 199mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h 200mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 201mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 202mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h 203mem_dbg.o: mem_dbg.c 204o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h 205o_dir.o: LPdir_unix.c o_dir.c o_dir.h 206o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h 207o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h 208o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h 209o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 210o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h 211o_init.o: ../include/openssl/symhacks.h o_init.c 212o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h 213o_str.o: o_str.c o_str.h 214o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c 215o_time.o: o_time.h 216tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 217tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 218tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h 219tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 220tmdiff.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 221tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 222tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h tmdiff.c 223uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 224uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 225uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 226uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c 227