2 # OpenSSL/crypto/Makefile
8 INCLUDE= -I. -I$(TOP) -I../include -Iinclude $(ZLIB_INCLUDE)
9 # INCLUDES targets sudbirs!
10 INCLUDES= -I.. -I../.. -I../modes -I../include -I../../include $(ZLIB_INCLUDE)
12 MAKEDEPPROG= makedepend
13 MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
18 RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
19 (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
20 $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
26 CFLAGS= $(INCLUDE) $(CFLAG)
27 ASFLAGS= $(INCLUDE) $(ASFLAG)
33 GENERAL=Makefile README crypto-lib.com install.com
35 LIB= $(TOP)/libcrypto.a
36 SHARED_LIB= libcrypto$(SHLIB_EXT)
37 LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
38 ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c fips_ers.c \
39 o_init.c o_fips.c sec_mem.c
40 LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
41 ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o fips_ers.o \
42 o_init.o o_fips.o sec_mem.o $(CPUID_OBJ)
46 HEADER= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h
48 ALL= $(GENERAL) $(SRC) $(HEADER)
51 @(cd ..; $(MAKE) DIRS=$(DIR) all)
55 fips: cryptlib.o thr_id.o uid.o $(CPUID_OBJ)
56 [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
57 ( obj=`$(PERL) $(TOP)/util/fipsobj.pl $$i` && \
58 cd $$i && echo "making fips in $(DIR)/$$i..." && \
59 $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$obj ) || exit 1; \
62 buildinf.h: ../Makefile
63 $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h
65 x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
66 $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
68 applink.o: $(TOP)/ms/applink.c
69 $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
71 uplink.o: $(TOP)/ms/uplink.c applink.o
72 $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
74 uplink-x86.s: $(TOP)/ms/uplink-x86.pl
75 $(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
77 x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
78 ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
79 ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
80 pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
81 alphacpuid.s: alphacpuid.pl
82 (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
83 $(PERL) alphacpuid.pl > $$preproc && \
84 $(CC) -E -P $$preproc > $@ && rm $$preproc)
85 arm64cpuid.S: arm64cpuid.pl; $(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@
86 armv4cpuid.S: armv4cpuid.pl; $(PERL) armv4cpuid.pl $(PERLASM_SCHEME) > $@
89 @target=all; $(RECURSIVE_MAKE)
92 $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
93 @target=files; $(RECURSIVE_MAKE)
95 # lib: $(LIB): are splitted to avoid end-less loop
99 $(AR) $(LIB) $(LIBOBJ)
100 $(RANLIB) $(LIB) || echo Never mind.
102 shared: buildinf.h lib subdirs
103 if [ -n "$(SHARED_LIBS)" ]; then \
104 (cd ..; $(MAKE) $(SHARED_LIB)); \
108 @target=lib; $(RECURSIVE_MAKE)
111 @target=lint; $(RECURSIVE_MAKE)
114 @[ -z "$(THIS)" ] || (set -e; target=update; $(RECURSIVE_MAKE) )
115 @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
118 @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
119 @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
121 @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
122 @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
123 @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
126 rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
127 @target=clean; $(RECURSIVE_MAKE)
130 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
131 mv -f Makefile.new $(MAKEFILE)
132 @target=dclean; $(RECURSIVE_MAKE)
134 # DO NOT DELETE THIS LINE -- make depend depends on it.
136 cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
137 cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
138 cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
139 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
140 cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
141 cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
142 cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
143 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
144 cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
145 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
146 cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
147 cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
148 cryptlib.o: include/internal/cryptlib.h
149 cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
150 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
151 cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
152 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
153 cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
154 cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
155 cversion.o: cversion.c include/internal/cryptlib.h
156 ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
157 ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
158 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
159 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
160 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
161 ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
162 ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ex_data.c
163 ex_data.o: include/internal/cryptlib.h
164 fips_ers.o: ../include/openssl/opensslconf.h fips_ers.c
165 lock.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
166 lock.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
167 lock.o: ../include/openssl/err.h ../include/openssl/lhash.h
168 lock.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
169 lock.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
170 lock.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
171 lock.o: include/internal/cryptlib.h lock.c
172 mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
173 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
174 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
175 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
176 mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
177 mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
178 mem.o: include/internal/cryptlib.h mem.c
179 mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
180 mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
181 mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
182 mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
183 mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
184 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
185 mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
186 mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
187 mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
188 mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
189 mem_dbg.o: include/internal/cryptlib.h mem_dbg.c
190 o_dir.o: ../e_os.h ../include/internal/o_dir.h ../include/openssl/e_os2.h
191 o_dir.o: ../include/openssl/opensslconf.h LPdir_unix.c o_dir.c
192 o_fips.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
193 o_fips.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
194 o_fips.o: ../include/openssl/err.h ../include/openssl/lhash.h
195 o_fips.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
196 o_fips.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
197 o_fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
198 o_fips.o: include/internal/cryptlib.h o_fips.c
199 o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h
200 o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h
201 o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
202 o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
203 o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h
204 o_init.o: ../include/openssl/symhacks.h o_init.c
205 o_str.o: ../e_os.h ../include/internal/o_str.h ../include/openssl/e_os2.h
206 o_str.o: ../include/openssl/opensslconf.h o_str.c
207 o_time.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
208 o_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
209 o_time.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
210 o_time.o: ../include/openssl/stack.h ../include/openssl/symhacks.h o_time.c
211 sec_mem.o: ../e_os.h ../include/openssl/crypto.h ../include/openssl/e_os2.h
212 sec_mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
213 sec_mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
214 sec_mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h sec_mem.c
215 thr_id.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
216 thr_id.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
217 thr_id.o: ../include/openssl/err.h ../include/openssl/lhash.h
218 thr_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
219 thr_id.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
220 thr_id.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
221 thr_id.o: include/internal/cryptlib.h thr_id.c
222 uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
223 uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
224 uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
225 uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c