]>
Commit | Line | Data |
---|---|---|
d02b48c6 | 1 | # |
15ac9716 | 2 | # OpenSSL/crypto/Makefile |
d02b48c6 RE |
3 | # |
4 | ||
5 | DIR= crypto | |
6 | TOP= .. | |
7 | CC= cc | |
cc7399e7 | 8 | INCLUDE= -I. -I$(TOP) -I../include $(ZLIB_INCLUDE) |
7abbffc3 | 9 | # INCLUDES targets sudbirs! |
27af42f9 | 10 | INCLUDES= -I.. -I../.. -I../modes -I../include -I../../include $(ZLIB_INCLUDE) |
d02b48c6 | 11 | CFLAG= -g |
cf1b7d96 RL |
12 | MAKEDEPPROG= makedepend |
13 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | |
42ba5d23 | 14 | MAKEFILE= Makefile |
bb8f3c58 | 15 | RM= rm -f |
d02b48c6 RE |
16 | AR= ar r |
17 | ||
02c31fa4 AP |
18 | RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \ |
19 | (cd $$i && echo "making $$target in $(DIR)/$$i..." && \ | |
a370537b | 20 | $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \ |
02c31fa4 AP |
21 | done; |
22 | ||
d02b48c6 RE |
23 | PEX_LIBS= |
24 | EX_LIBS= | |
25 | ||
664b9985 | 26 | CFLAGS= $(INCLUDE) $(CFLAG) |
14e21f86 | 27 | ASFLAGS= $(INCLUDE) $(ASFLAG) |
16760a30 | 28 | AFLAGS=$(ASFLAGS) |
167066fe | 29 | CPUID_OBJ=mem_clr.o |
58964a49 | 30 | |
d02b48c6 RE |
31 | LIBS= |
32 | ||
7d7d2cbc | 33 | GENERAL=Makefile README crypto-lib.com install.com |
d02b48c6 RE |
34 | |
35 | LIB= $(TOP)/libcrypto.a | |
a7b42009 | 36 | SHARED_LIB= libcrypto$(SHLIB_EXT) |
3f746831 DSH |
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 \ | |
086e32a6 | 39 | o_init.c o_fips.c |
3f746831 DSH |
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 \ | |
086e32a6 | 42 | o_init.o o_fips.o $(CPUID_OBJ) |
d02b48c6 RE |
43 | |
44 | SRC= $(LIBSRC) | |
45 | ||
b39fc560 | 46 | HEADER= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h |
d02b48c6 | 47 | |
a80e33b9 | 48 | ALL= $(GENERAL) $(SRC) $(HEADER) |
d02b48c6 RE |
49 | |
50 | top: | |
51 | @(cd ..; $(MAKE) DIRS=$(DIR) all) | |
52 | ||
919f8bcd | 53 | all: shared |
d02b48c6 | 54 | |
eead69f5 DSH |
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; \ | |
60 | done; | |
61 | ||
42ba5d23 | 62 | buildinf.h: ../Makefile |
2d267179 | 63 | $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h |
d02b48c6 | 64 | |
fa8e921f AP |
65 | x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl |
66 | $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ | |
ec38ddc7 | 67 | |
5b50f99e AP |
68 | applink.o: $(TOP)/ms/applink.c |
69 | $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c | |
51ff6bde | 70 | |
5b50f99e AP |
71 | uplink.o: $(TOP)/ms/uplink.c applink.o |
72 | $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c | |
73 | ||
beef7145 AP |
74 | uplink-x86.s: $(TOP)/ms/uplink-x86.pl |
75 | $(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@ | |
51ff6bde | 76 | |
cb3b9b13 AP |
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) $@ | |
149b1807 | 81 | alphacpuid.s: alphacpuid.pl |
d475b2a3 | 82 | (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \ |
d1cf23ac | 83 | $(PERL) alphacpuid.pl > $$preproc && \ |
d475b2a3 | 84 | $(CC) -E -P $$preproc > $@ && rm $$preproc) |
9b05cbc3 | 85 | arm64cpuid.S: arm64cpuid.pl; $(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@ |
313e6ec1 | 86 | armv4cpuid.S: armv4cpuid.pl; $(PERL) armv4cpuid.pl $(PERLASM_SCHEME) > $@ |
14e21f86 | 87 | |
d02b48c6 | 88 | subdirs: |
02c31fa4 | 89 | @target=all; $(RECURSIVE_MAKE) |
d02b48c6 RE |
90 | |
91 | files: | |
4e232289 | 92 | $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO |
02c31fa4 | 93 | @target=files; $(RECURSIVE_MAKE) |
d02b48c6 | 94 | |
e347b0da | 95 | # lib: $(LIB): are splitted to avoid end-less loop |
52b1fbbd AP |
96 | lib: $(LIB) |
97 | @touch lib | |
52b1fbbd | 98 | $(LIB): $(LIBOBJ) |
f072785e | 99 | $(AR) $(LIB) $(LIBOBJ) |
4e20b1a6 | 100 | $(RANLIB) $(LIB) || echo Never mind. |
d02b48c6 | 101 | |
919f8bcd | 102 | shared: buildinf.h lib subdirs |
a7b42009 | 103 | if [ -n "$(SHARED_LIBS)" ]; then \ |
e70a3983 | 104 | (cd ..; $(MAKE) $(SHARED_LIB)); \ |
a7b42009 RL |
105 | fi |
106 | ||
d02b48c6 | 107 | libs: |
02c31fa4 | 108 | @target=lib; $(RECURSIVE_MAKE) |
d02b48c6 | 109 | |
d02b48c6 | 110 | lint: |
02c31fa4 | 111 | @target=lint; $(RECURSIVE_MAKE) |
d02b48c6 RE |
112 | |
113 | depend: | |
02c31fa4 AP |
114 | @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist |
115 | @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | |
116 | @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h | |
117 | @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) ) | |
7abbffc3 | 118 | @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi |
d02b48c6 RE |
119 | |
120 | clean: | |
14e21f86 | 121 | rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
02c31fa4 | 122 | @target=clean; $(RECURSIVE_MAKE) |
d02b48c6 RE |
123 | |
124 | dclean: | |
99aab161 | 125 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
d02b48c6 | 126 | mv -f Makefile.new $(MAKEFILE) |
02c31fa4 | 127 | @target=dclean; $(RECURSIVE_MAKE) |
d02b48c6 | 128 | |
d02b48c6 | 129 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
6242bb9c | 130 | |
1c4f90a0 | 131 | cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h |
cf1b7d96 RL |
132 | cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h |
133 | cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | |
c57bc2dc GT |
134 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h |
135 | cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h | |
136 | cpt_err.o: ../include/openssl/symhacks.h cpt_err.c | |
41d2a336 RL |
137 | cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
138 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
139 | cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
140 | cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
c57bc2dc GT |
141 | cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
142 | cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c | |
143 | cryptlib.o: cryptlib.h | |
41d2a336 RL |
144 | cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
145 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
146 | cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
147 | cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
c57bc2dc GT |
148 | cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
149 | cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h | |
150 | cversion.o: cryptlib.h cversion.c | |
3aecef76 | 151 | ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c |
41d2a336 RL |
152 | ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
153 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
154 | ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
155 | ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
c57bc2dc GT |
156 | ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
157 | ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | |
158 | ex_data.o: ex_data.c | |
ae53b299 | 159 | fips_ers.o: ../include/openssl/opensslconf.h fips_ers.c |
9d0397e9 BM |
160 | lock.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
161 | lock.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
ae53b299 BM |
162 | lock.o: ../include/openssl/err.h ../include/openssl/lhash.h |
163 | lock.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
164 | lock.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h | |
165 | lock.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | |
166 | lock.o: lock.c | |
41d2a336 RL |
167 | mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
168 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
169 | mem.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
170 | mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
c57bc2dc GT |
171 | mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
172 | mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | |
173 | mem.o: mem.c | |
df29cc8f RL |
174 | mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h |
175 | mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
9c52d2cc GT |
176 | mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
177 | mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c | |
41d2a336 RL |
178 | mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
179 | mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
180 | mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
181 | mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
c57bc2dc GT |
182 | mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
183 | mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | |
184 | mem_dbg.o: mem_dbg.c | |
c40dba98 RL |
185 | o_dir.o: ../e_os.h ../include/internal/o_dir.h ../include/openssl/e_os2.h |
186 | o_dir.o: ../include/openssl/opensslconf.h LPdir_unix.c o_dir.c | |
ae53b299 BM |
187 | o_fips.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
188 | o_fips.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
189 | o_fips.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
190 | o_fips.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
191 | o_fips.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h | |
192 | o_fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | |
193 | o_fips.o: o_fips.c | |
194 | o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h | |
195 | o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h | |
196 | o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | |
197 | o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h | |
198 | o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h | |
199 | o_init.o: ../include/openssl/symhacks.h o_init.c | |
c40dba98 RL |
200 | o_str.o: ../e_os.h ../include/internal/o_str.h ../include/openssl/e_os2.h |
201 | o_str.o: ../include/openssl/opensslconf.h o_str.c | |
fd0ba777 MC |
202 | o_time.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h |
203 | o_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
204 | o_time.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h | |
205 | o_time.o: ../include/openssl/stack.h ../include/openssl/symhacks.h o_time.c | |
9d0397e9 BM |
206 | thr_id.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
207 | thr_id.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
208 | thr_id.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
209 | thr_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
210 | thr_id.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h | |
211 | thr_id.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h | |
212 | thr_id.o: thr_id.c | |
cf1b7d96 RL |
213 | uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h |
214 | uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
9c52d2cc GT |
215 | uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h |
216 | uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c |