]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/Makefile.in
Implement new multi-threading API
[thirdparty/openssl.git] / crypto / Makefile.in
CommitLineData
d10dac11
RS
1#
2# OpenSSL/crypto/Makefile
3#
4
5DIR= crypto
6TOP= ..
7CC= cc
8INCLUDE= -I. -I$(TOP) -I../include -Iinclude $(ZLIB_INCLUDE)
9# INCLUDES targets sudbirs!
10INCLUDES= -I.. -I../.. -I../modes -I../include -I../../include $(ZLIB_INCLUDE)
11CFLAG= -g
d10dac11
RS
12MAKEFILE= Makefile
13RM= rm -f
14AR= ar r
15
16RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
17 (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
18 $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
19 done;
20
c86ddbe6 21PLIB_LDFLAG=
d10dac11 22EX_LIBS=
1740c162 23
45502bfe 24CFLAGS= $(INCLUDE) $(CFLAG) $(SHARED_CFLAG)
d10dac11
RS
25ASFLAGS= $(INCLUDE) $(ASFLAG)
26AFLAGS=$(ASFLAGS)
27CPUID_OBJ=mem_clr.o
28
29LIBS=
30
31GENERAL=Makefile README crypto-lib.com install.com
32
33LIB= $(TOP)/libcrypto.a
34SHARED_LIB= libcrypto$(SHLIB_EXT)
35LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
effaf4de 36 ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
71a04cfc 37 threads_pthread.c threads_win.c threads_none.c \
b184e3ef 38 o_init.c o_fips.c mem_sec.c init.c
d10dac11 39LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
effaf4de 40 ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o \
71a04cfc 41 threads_pthread.o threads_win.o threads_none.o \
b184e3ef 42 o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ)
d10dac11
RS
43
44SRC= $(LIBSRC)
45
46HEADER= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h
47
48ALL= $(GENERAL) $(SRC) $(HEADER)
49
50top:
51 @(cd ..; $(MAKE) DIRS=$(DIR) all)
52
53all: shared
54
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
62buildinf.h: ../Makefile
076e596f 63 $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS_Q)" "$(PLATFORM)" >buildinf.h
d10dac11
RS
64
65x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
66 $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
67
68applink.o: $(TOP)/ms/applink.c
69 $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
70
71uplink.o: $(TOP)/ms/uplink.c applink.o
72 $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
73
74uplink-x86.s: $(TOP)/ms/uplink-x86.pl
75 $(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
76
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) $@
81alphacpuid.s: alphacpuid.pl
82 (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
83 $(PERL) alphacpuid.pl > $$preproc && \
84 $(CC) -E -P $$preproc > $@ && rm $$preproc)
85arm64cpuid.S: arm64cpuid.pl; $(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@
86armv4cpuid.S: armv4cpuid.pl; $(PERL) armv4cpuid.pl $(PERLASM_SCHEME) > $@
87
88subdirs:
89 @target=all; $(RECURSIVE_MAKE)
90
91files:
92 $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
93 @target=files; $(RECURSIVE_MAKE)
94
95# lib: $(LIB): are splitted to avoid end-less loop
96lib: $(LIB)
97 @touch lib
98$(LIB): $(LIBOBJ)
99 $(AR) $(LIB) $(LIBOBJ)
100 $(RANLIB) $(LIB) || echo Never mind.
101
102shared: buildinf.h lib subdirs
103 if [ -n "$(SHARED_LIBS)" ]; then \
104 (cd ..; $(MAKE) $(SHARED_LIB)); \
105 fi
106
107libs:
108 @target=lib; $(RECURSIVE_MAKE)
109
56c77c52 110depend:
d10dac11 111 @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
ce192ebe 112 @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDE) -- $(PROGS) $(LIBSRC)
d10dac11 113 @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
56c77c52
RS
114 @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
115 @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
d10dac11
RS
116clean:
117 rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
118 @target=clean; $(RECURSIVE_MAKE)
119
d10dac11 120# DO NOT DELETE THIS LINE -- make depend depends on it.