Replace "SSLeay" in API with OpenSSL
[openssl.git] / engines / Makefile
1 #
2 # OpenSSL/engines/Makefile
3 #
4
5 #The following engines have been disabled as they currently do not build
6 # sureware ubsec
7
8 DIR=    engines
9 TOP=    ..
10 CC=     cc
11 INCLUDES= -I../include
12 CFLAG=-g
13 MAKEFILE=       Makefile
14 AR=             ar r
15 ENGDIRS= ccgost
16
17 RECURSIVE_MAKE= [ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
18                     (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
19                     $(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
20                 done;
21
22 ENGINES_ASM_OBJ=
23
24 PEX_LIBS=
25 EX_LIBS=
26
27 CFLAGS= $(INCLUDES) $(CFLAG)
28 ASFLAGS= $(INCLUDES) $(ASFLAG)
29 AFLAGS= $(ASFLAGS)
30
31 GENERAL=Makefile engines.com install.com engine_vector.mar
32
33 LIB=$(TOP)/libcrypto.a
34 LIBNAMES= gmp padlock capi
35 LIBSRC= e_gmp.c \
36         e_padlock.c \
37         e_capi.c
38 LIBOBJ= e_gmp.o \
39         e_padlock.o \
40         e_capi.o \
41         $(ENGINES_ASM_OBJ)
42
43 TESTLIBNAMES= ossltest
44 TESTLIBSRC= e_ossltest.c
45 TESTLIBOBJ= e_ossltest.o
46
47 SRC= $(LIBSRC)
48
49 HEADER= e_gmp_err.c e_gmp_err.h \
50         e_chil_err.c e_chil_err.h \
51         e_ubsec_err.c e_ubsec_err.h \
52         e_capi_err.c e_capi_err.h \
53         e_ossltest_err.c e_ossltest_err.h
54
55 ALL=    $(GENERAL) $(SRC) $(HEADER)
56
57 top:
58         (cd ..; $(MAKE) DIRS=$(DIR) all)
59
60 all:    lib subdirs
61
62 lib:    $(LIBOBJ) $(TESTLIBOBJ)
63         @if [ -n "$(SHARED_LIBS)" ]; then \
64                 set -e; \
65                 for l in $(LIBNAMES) $(TESTLIBNAMES); do \
66                         $(MAKE) -f ../Makefile.shared -e \
67                                 LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
68                                 LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
69                                 link_o.$(SHLIB_TARGET); \
70                 done; \
71         else \
72                 $(AR) $(LIB) $(LIBOBJ); \
73                 $(RANLIB) $(LIB) || echo Never mind.; \
74         fi; \
75         touch lib
76
77 e_padlock-x86.s:        asm/e_padlock-x86.pl
78         $(PERL) asm/e_padlock-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
79 e_padlock-x86_64.s:     asm/e_padlock-x86_64.pl
80         $(PERL) asm/e_padlock-x86_64.pl $(PERLASM_SCHEME) > $@
81
82 subdirs:
83         @target=all; $(RECURSIVE_MAKE)
84
85 files:
86         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
87         @target=files; $(RECURSIVE_MAKE)
88
89 # XXXXX This currently only works on systems that use .so as suffix
90 # for shared libraries as well as for Cygwin which uses the
91 # dlfcn_name_converter and therefore stores the engines with .so suffix, too.
92 # XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
93 # XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix.
94 install:
95         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
96         @if [ -n "$(SHARED_LIBS)" ]; then \
97                 set -e; \
98                 $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
99                 for l in $(LIBNAMES); do \
100                         ( echo installing $$l; \
101                           pfx=lib; \
102                           if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
103                                 sfx=".so"; \
104                                 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
105                           else \
106                                 case "$(CFLAGS)" in \
107                                 *DSO_DLFCN*)    sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;    \
108                                 *DSO_DL*)       sfx=".sl";;     \
109                                 *DSO_WIN32*)    sfx="eay32.dll"; pfx=;; \
110                                 *)              sfx=".bad";;    \
111                                 esac; \
112                                 cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
113                           fi; \
114                           chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
115                           mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
116                 done; \
117         fi
118         @target=install; $(RECURSIVE_MAKE)
119
120 tags:
121         ctags $(SRC)
122
123 errors:
124         set -e; for l in $(LIBNAMES); do \
125                 $(PERL) ../util/mkerr.pl -conf e_$$l.ec \
126                         -nostatic -staticloader -write e_$$l.c; \
127         done
128         (cd ccgost; $(MAKE) PERL=$(PERL) errors)
129
130 tests:
131
132 lint:
133         lint -DLINT $(INCLUDES) $(SRC)>fluff
134         @target=lint; $(RECURSIVE_MAKE)
135
136 update: local_depend
137         @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
138         @[ -z "$(THIS)" ] || (set -e; target=update; $(RECURSIVE_MAKE) )
139
140 depend: local_depend
141         @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
142         @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
143 local_depend:
144         @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
145
146 dclean:
147         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
148         mv -f Makefile.new $(MAKEFILE)
149         @target=dclean; $(RECURSIVE_MAKE)
150
151 clean:
152         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
153         @target=clean; $(RECURSIVE_MAKE)
154
155 # DO NOT DELETE THIS LINE -- make depend depends on it.
156
157 e_capi.o: ../include/openssl/asn1.h ../include/openssl/bio.h
158 e_capi.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
159 e_capi.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
160 e_capi.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
161 e_capi.o: ../include/openssl/engine.h ../include/openssl/evp.h
162 e_capi.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
163 e_capi.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
164 e_capi.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
165 e_capi.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
166 e_capi.o: ../include/openssl/sha.h ../include/openssl/stack.h
167 e_capi.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
168 e_capi.o: ../include/openssl/x509_vfy.h e_capi.c
169 e_gmp.o: ../include/openssl/asn1.h ../include/openssl/bio.h
170 e_gmp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
171 e_gmp.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
172 e_gmp.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
173 e_gmp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
174 e_gmp.o: ../include/openssl/evp.h ../include/openssl/lhash.h
175 e_gmp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
176 e_gmp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
177 e_gmp.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
178 e_gmp.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
179 e_gmp.o: ../include/openssl/sha.h ../include/openssl/stack.h
180 e_gmp.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
181 e_gmp.o: ../include/openssl/x509_vfy.h e_gmp.c
182 e_ossltest.o: ../include/openssl/aes.h ../include/openssl/asn1.h
183 e_ossltest.o: ../include/openssl/bio.h ../include/openssl/buffer.h
184 e_ossltest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
185 e_ossltest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
186 e_ossltest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
187 e_ossltest.o: ../include/openssl/err.h ../include/openssl/evp.h
188 e_ossltest.o: ../include/openssl/lhash.h ../include/openssl/md5.h
189 e_ossltest.o: ../include/openssl/modes.h ../include/openssl/obj_mac.h
190 e_ossltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
191 e_ossltest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
192 e_ossltest.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
193 e_ossltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
194 e_ossltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
195 e_ossltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
196 e_ossltest.o: e_ossltest.c e_ossltest_err.c e_ossltest_err.h
197 e_padlock.o: ../include/openssl/aes.h ../include/openssl/asn1.h
198 e_padlock.o: ../include/openssl/bio.h ../include/openssl/buffer.h
199 e_padlock.o: ../include/openssl/crypto.h ../include/openssl/dso.h
200 e_padlock.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
201 e_padlock.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
202 e_padlock.o: ../include/openssl/engine.h ../include/openssl/err.h
203 e_padlock.o: ../include/openssl/evp.h ../include/openssl/lhash.h
204 e_padlock.o: ../include/openssl/modes.h ../include/openssl/obj_mac.h
205 e_padlock.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
206 e_padlock.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
207 e_padlock.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
208 e_padlock.o: ../include/openssl/safestack.h ../include/openssl/sha.h
209 e_padlock.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
210 e_padlock.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
211 e_padlock.o: e_padlock.c