RT 4393: Call EC_GROUP_order_bits in priv2opt.
[openssl.git] / crypto / Makefile.in
1 #
2 # OpenSSL/crypto/Makefile
3 #
4
5 DIR=            crypto
6 TOP=            ..
7 CC=             cc
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)
11 CFLAG=          -g
12 MAKEFILE=       Makefile
13 RM=             rm -f
14 AR=             ar r
15
16 RECURSIVE_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
21 PLIB_LDFLAG=
22 EX_LIBS=
23
24 CFLAGS= $(INCLUDE) $(CFLAG) $(SHARED_CFLAG)
25 ASFLAGS= $(INCLUDE) $(ASFLAG) $(SHARED_CFLAG)
26 AFLAGS=$(ASFLAGS)
27 CPUID_OBJ=mem_clr.o
28 UPLINK_OBJ=
29
30 LIBS=
31
32 GENERAL=Makefile README crypto-lib.com install.com
33
34 LIB= $(TOP)/libcrypto.a
35 SHARED_LIB= libcrypto$(SHLIB_EXT)
36 LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
37         ebcdic.c uid.c o_time.c o_str.c o_dir.c \
38         threads_pthread.c threads_win.c threads_none.c \
39         o_init.c o_fips.c mem_sec.c init.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 \
42         threads_pthread.o threads_win.o threads_none.o \
43         o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ) $(UPLINK_OBJ)
44
45 SRC= $(LIBSRC)
46
47 HEADER= buildinf.h arm_arch.h ppc_arch.h sparc_arch.h
48
49 ALL=    $(GENERAL) $(SRC) $(HEADER)
50
51 top:
52         @(cd ..; $(MAKE) DIRS=$(DIR) all)
53
54 all: shared
55
56 fips: cryptlib.o thr_id.o uid.o $(CPUID_OBJ)
57         [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
58                     ( obj=`$(PERL) $(TOP)/util/fipsobj.pl $$i` && \
59                         cd $$i && echo "making fips in $(DIR)/$$i..." && \
60                     $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$obj ) || exit 1; \
61                 done;
62
63 buildinf.h: ../Makefile
64         $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS_Q)" "$(PLATFORM)" >buildinf.h
65
66 x86cpuid.s:     x86cpuid.pl perlasm/x86asm.pl
67         $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
68
69 applink.o:      $(TOP)/ms/applink.c
70         $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
71
72 uplink.o:       $(TOP)/ms/uplink.c applink.o
73         $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
74
75 uplink-x86.s:   $(TOP)/ms/uplink-x86.pl
76         $(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) $@
77
78 x86_64cpuid.s:  x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) $@
79 ia64cpuid.s:    ia64cpuid.S;    $(CC) $(CFLAGS) -E ia64cpuid.S > $@
80 ppccpuid.s:     ppccpuid.pl;    $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
81 pariscid.s:     pariscid.pl;    $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
82 alphacpuid.s:   alphacpuid.pl
83         (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
84         $(PERL) alphacpuid.pl $$preproc && \
85         $(CC) -E -P $$preproc > $@ && rm $$preproc)
86 arm64cpuid.S:   arm64cpuid.pl;  $(PERL) arm64cpuid.pl $(PERLASM_SCHEME) $@
87 armv4cpuid.S:   armv4cpuid.pl;  $(PERL) armv4cpuid.pl $(PERLASM_SCHEME) $@
88
89 subdirs:
90         @target=all; $(RECURSIVE_MAKE)
91
92 # lib: $(LIB): are splitted to avoid end-less loop
93 lib:    $(LIB)
94         @touch lib
95 $(LIB): $(LIBOBJ)
96         $(AR) $(LIB) $(LIBOBJ)
97         $(RANLIB) $(LIB) || echo Never mind.
98
99 shared: buildinf.h lib subdirs
100         if [ -n "$(SHARED_LIBS)" ]; then \
101                 (cd ..; $(MAKE) $(SHARED_LIB)); \
102         fi
103
104 libs:
105         @target=lib; $(RECURSIVE_MAKE)
106
107 depend:
108         @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
109         @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDE) -- $(PROGS) $(LIBSRC)
110         @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
111         @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
112         @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
113 clean:
114         rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
115         @target=clean; $(RECURSIVE_MAKE)
116
117 # DO NOT DELETE THIS LINE -- make depend depends on it.