]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/Makefile.ssl
Support INSTALL_PREFIX for packagers.
[thirdparty/openssl.git] / crypto / Makefile.ssl
1 #
2 # SSLeay/crypto/Makefile
3 #
4
5 DIR= crypto
6 TOP= ..
7 CC= cc
8 INCLUDE= -I. -I../include
9 INCLUDES= -I.. -I../../include
10 CFLAG= -g
11 INSTALL_PREFIX=
12 OPENSSLDIR= /usr/local/ssl
13 INSTALLTOP= /usr/local/ssl
14 MAKE= make -f Makefile.ssl
15 MAKEDEPEND= $(TOP)/util/domd $(TOP)
16 MAKEFILE= Makefile.ssl
17 RM= rm -f
18 AR= ar r
19
20 PEX_LIBS=
21 EX_LIBS=
22
23 CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS="\"$(CC) $(CFLAG)\"" -DPLATFORM="\"$(PLATFORM)\""
24
25
26 LIBS=
27
28 SDIRS= md2 md5 sha mdc2 hmac ripemd \
29 des rc2 rc4 rc5 idea bf cast \
30 bn rsa dsa dh \
31 buffer bio stack lhash rand err objects \
32 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
33
34 GENERAL=Makefile README
35
36 LIB= $(TOP)/libcrypto.a
37 LIBSRC= cryptlib.c mem.c cversion.c ex_data.c tmdiff.c cpt_err.c
38 LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o cpt_err.o
39
40 SRC= $(LIBSRC)
41
42 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h
43 HEADER= cryptlib.h date.h $(EXHEADER)
44
45 ALL= $(GENERAL) $(SRC) $(HEADER)
46
47 top:
48 @(cd ..; $(MAKE) DIRS=$(DIR) all)
49
50 all: date.h lib subdirs
51
52 date.h: ../Makefile.ssl
53 echo "#define DATE \"`date`\"" >date.h
54
55 subdirs:
56 @for i in $(SDIRS) ;\
57 do \
58 (cd $$i && echo "making all in crypto/$$i..." && \
59 $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
60 done;
61
62 files:
63 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
64 @for i in $(SDIRS) ;\
65 do \
66 (cd $$i; echo "making 'files' in crypto/$$i..."; \
67 $(MAKE) files ); \
68 done;
69
70 links:
71 @$(TOP)/util/point.sh Makefile.ssl Makefile
72 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
73 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
74 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
75 @$(TOP)/util/point.sh Makefile.ssl Makefile
76 @for i in $(SDIRS); do \
77 (cd $$i; echo "making links in crypto/$$i..."; \
78 $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
79 done;
80
81 lib: $(LIBOBJ)
82 $(AR) $(LIB) $(LIBOBJ)
83 $(RANLIB) $(LIB)
84 @touch lib
85
86 libs:
87 @for i in $(SDIRS) ;\
88 do \
89 (cd $$i; echo "making libs in crypto/$$i..."; \
90 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
91 done;
92
93 tests:
94 @for i in $(SDIRS) ;\
95 do \
96 (cd $$i; echo "making tests in crypto/$$i..."; \
97 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
98 done;
99
100 install:
101 @for i in $(EXHEADER) ;\
102 do \
103 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
104 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
105 done;
106 @for i in $(SDIRS) ;\
107 do \
108 (cd $$i; echo "making install in crypto/$$i..."; \
109 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
110 done;
111
112 lint:
113 @for i in $(SDIRS) ;\
114 do \
115 (cd $$i; echo "making lint in crypto/$$i..."; \
116 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
117 done;
118
119 depend:
120 $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
121 @for i in $(SDIRS) ;\
122 do \
123 (cd $$i; echo "making depend in crypto/$$i..."; \
124 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
125 done;
126
127 clean:
128 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
129 @for i in $(SDIRS) ;\
130 do \
131 (cd $$i; echo "making clean in crypto/$$i..."; \
132 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
133 done;
134
135 dclean:
136 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
137 mv -f Makefile.new $(MAKEFILE)
138 @for i in $(SDIRS) ;\
139 do \
140 (cd $$i; echo "making dclean in crypto/$$i..."; \
141 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
142 done;
143
144 # DO NOT DELETE THIS LINE -- make depend depends on it.
145
146 cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h
147 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
148 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
149 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
150 cryptlib.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
151 cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
152 cryptlib.o: date.h
153 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
154 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
155 cversion.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
156 cversion.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
157 cversion.o: date.h
158 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
159 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
160 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
161 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
162 ex_data.o: ../include/openssl/stack.h cryptlib.h
163 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
164 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
165 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
166 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
167 mem.o: ../include/openssl/stack.h cryptlib.h
168 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
169 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
170 tmdiff.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
171 tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
172 tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h