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