]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/Makefile
make depend
[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 \
086e32a6 39 o_init.c o_fips.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 \
086e32a6 42 o_init.o o_fips.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
RE
112
113depend:
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
120clean:
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
124dclean:
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 131cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
cf1b7d96
RL
132cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
133cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
c57bc2dc
GT
134cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
135cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
136cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
41d2a336
RL
137cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
138cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
139cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
140cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
141cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
142cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
a3aadb2d 143cryptlib.o: include/internal/cryptlib.h
41d2a336
RL
144cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
145cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
146cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
147cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
148cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
149cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
a3aadb2d 150cversion.o: cversion.c include/internal/cryptlib.h
3aecef76 151ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
41d2a336
RL
152ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
153ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
154ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
155ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc 156ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
a3aadb2d
RL
157ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ex_data.c
158ex_data.o: include/internal/cryptlib.h
ae53b299 159fips_ers.o: ../include/openssl/opensslconf.h fips_ers.c
9d0397e9
BM
160lock.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
161lock.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
ae53b299
BM
162lock.o: ../include/openssl/err.h ../include/openssl/lhash.h
163lock.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
164lock.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
a3aadb2d
RL
165lock.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
166lock.o: include/internal/cryptlib.h lock.c
41d2a336
RL
167mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
168mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
169mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
170mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc 171mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
a3aadb2d
RL
172mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
173mem.o: include/internal/cryptlib.h mem.c
df29cc8f
RL
174mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
175mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
9c52d2cc
GT
176mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
177mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
41d2a336
RL
178mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
179mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
180mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
181mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc 182mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
a3aadb2d
RL
183mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
184mem_dbg.o: include/internal/cryptlib.h mem_dbg.c
c40dba98
RL
185o_dir.o: ../e_os.h ../include/internal/o_dir.h ../include/openssl/e_os2.h
186o_dir.o: ../include/openssl/opensslconf.h LPdir_unix.c o_dir.c
ae53b299
BM
187o_fips.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
188o_fips.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
189o_fips.o: ../include/openssl/err.h ../include/openssl/lhash.h
190o_fips.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
191o_fips.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
a3aadb2d
RL
192o_fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
193o_fips.o: include/internal/cryptlib.h o_fips.c
ae53b299
BM
194o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h
195o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h
196o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
197o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
198o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h
199o_init.o: ../include/openssl/symhacks.h o_init.c
c40dba98
RL
200o_str.o: ../e_os.h ../include/internal/o_str.h ../include/openssl/e_os2.h
201o_str.o: ../include/openssl/opensslconf.h o_str.c
fd0ba777
MC
202o_time.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
203o_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
204o_time.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
205o_time.o: ../include/openssl/stack.h ../include/openssl/symhacks.h o_time.c
9d0397e9
BM
206thr_id.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
207thr_id.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
208thr_id.o: ../include/openssl/err.h ../include/openssl/lhash.h
209thr_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
210thr_id.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
a3aadb2d
RL
211thr_id.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
212thr_id.o: include/internal/cryptlib.h thr_id.c
cf1b7d96
RL
213uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
214uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
9c52d2cc
GT
215uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
216uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c