Makefile 8.7 KB
Newer Older
1
#
2
# OpenSSL/engines/Makefile
3 4
#

5
#The following engines have been disabled as they currently do not build
M
Matt Caswell 已提交
6
# sureware ubsec
7

8 9 10 11 12
DIR=	engines
TOP=	..
CC=	cc
INCLUDES= -I../include
CFLAG=-g
B
Ben Laurie 已提交
13
MAKEFILE=	Makefile
14
AR=		ar r
15
ENGDIRS= ccgost
D
Dr. Stephen Henson 已提交
16

17
RECURSIVE_MAKE=	[ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
D
Dr. Stephen Henson 已提交
18 19 20
		    (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
		    $(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
		done;
21

22 23
ENGINES_ASM_OBJ=

24 25
PEX_LIBS=
EX_LIBS=
26

27
CFLAGS= $(INCLUDES) $(CFLAG)
28
ASFLAGS= $(INCLUDES) $(ASFLAG)
29
AFLAGS= $(ASFLAGS)
30

R
Richard Levitte 已提交
31
GENERAL=Makefile engines.com install.com engine_vector.mar
32 33

LIB=$(TOP)/libcrypto.a
M
Matt Caswell 已提交
34
LIBNAMES= gmp padlock capi dasync
M
Matt Caswell 已提交
35
LIBSRC=	e_gmp.c \
36
	e_padlock.c \
M
Matt Caswell 已提交
37 38
	e_capi.c \
	e_dasync.c
M
Matt Caswell 已提交
39
LIBOBJ= e_gmp.o \
40
	e_padlock.o \
41
	e_capi.o \
M
Matt Caswell 已提交
42
	e_dasync.o \
43
	$(ENGINES_ASM_OBJ)
44

45 46 47 48
TESTLIBNAMES= ossltest
TESTLIBSRC= e_ossltest.c
TESTLIBOBJ= e_ossltest.o

49 50
SRC= $(LIBSRC)

M
Matt Caswell 已提交
51
HEADER=	e_gmp_err.c e_gmp_err.h \
52
	e_chil_err.c e_chil_err.h \
53
	e_ubsec_err.c e_ubsec_err.h \
M
Matt Caswell 已提交
54
	e_capi_err.c e_capi_err.h \
M
Matt Caswell 已提交
55 56
	e_ossltest_err.c e_ossltest_err.h \
	e_dasync_err.c e_dasync_err.h
57

58
ALL=	$(GENERAL) $(SRC) $(HEADER)
59 60 61 62

top:
	(cd ..; $(MAKE) DIRS=$(DIR) all)

63
all:	lib subdirs
64

65
lib:	$(LIBOBJ) $(TESTLIBOBJ)
66 67
	@if [ -n "$(SHARED_LIBS)" ]; then \
		set -e; \
68
		for l in $(LIBNAMES) $(TESTLIBNAMES); do \
A
Andy Polyakov 已提交
69
			$(MAKE) -f ../Makefile.shared -e \
70
				LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
71
				LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
72 73 74 75 76 77
				link_o.$(SHLIB_TARGET); \
		done; \
	else \
		$(AR) $(LIB) $(LIBOBJ); \
		$(RANLIB) $(LIB) || echo Never mind.; \
	fi; \
R
Richard Levitte 已提交
78
	touch lib
79

80 81 82 83 84
e_padlock-x86.s:	asm/e_padlock-x86.pl
	$(PERL) asm/e_padlock-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
e_padlock-x86_64.s:	asm/e_padlock-x86_64.pl
	$(PERL) asm/e_padlock-x86_64.pl $(PERLASM_SCHEME) > $@

D
Dr. Stephen Henson 已提交
85 86 87
subdirs:
	@target=all; $(RECURSIVE_MAKE)

88
files:
B
Ben Laurie 已提交
89
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
D
Dr. Stephen Henson 已提交
90
	@target=files; $(RECURSIVE_MAKE)
91 92

# XXXXX This currently only works on systems that use .so as suffix
93 94
# for shared libraries as well as for Cygwin which uses the
# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
95
# XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
96
# XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix.
97
install:
A
Andy Polyakov 已提交
98
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
99 100
	@if [ -n "$(SHARED_LIBS)" ]; then \
		set -e; \
D
Dr. Stephen Henson 已提交
101
		$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
102
		for l in $(LIBNAMES); do \
G
Geoff Thorpe 已提交
103
			( echo installing $$l; \
104
			  pfx=lib; \
105 106 107 108
			  if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
				sfx=".so"; \
				cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
			  else \
109
				case "$(CFLAGS)" in \
110
				*DSO_DLFCN*)	sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;	\
111 112 113
				*DSO_DL*)	sfx=".sl";;	\
				*DSO_WIN32*)	sfx="eay32.dll"; pfx=;;	\
				*)		sfx=".bad";;	\
114
				esac; \
D
Dr. Stephen Henson 已提交
115
				cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
116
			  fi; \
D
Dr. Stephen Henson 已提交
117 118
			  chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
			  mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
119 120
		done; \
	fi
D
Dr. Stephen Henson 已提交
121
	@target=install; $(RECURSIVE_MAKE)
122 123 124 125 126 127 128 129 130

tags:
	ctags $(SRC)

errors:
	set -e; for l in $(LIBNAMES); do \
		$(PERL) ../util/mkerr.pl -conf e_$$l.ec \
			-nostatic -staticloader -write e_$$l.c; \
	done
131
	(cd ccgost; $(MAKE) PERL=$(PERL) errors)
132 133 134 135 136

tests:

lint:
	lint -DLINT $(INCLUDES) $(SRC)>fluff
D
Dr. Stephen Henson 已提交
137
	@target=lint; $(RECURSIVE_MAKE)
138

139 140
update: local_depend
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
141
	@[ -z "$(THIS)" ] || (set -e; target=update; $(RECURSIVE_MAKE) )
142 143 144

depend: local_depend
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
D
Dr. Stephen Henson 已提交
145
	@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
146
local_depend:
147
	@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
148 149 150 151

dclean:
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
	mv -f Makefile.new $(MAKEFILE)
D
Dr. Stephen Henson 已提交
152
	@target=dclean; $(RECURSIVE_MAKE)
153 154

clean:
155
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
D
Dr. Stephen Henson 已提交
156
	@target=clean; $(RECURSIVE_MAKE)
157 158

# DO NOT DELETE THIS LINE -- make depend depends on it.
U
Ulf Möller 已提交
159

B
Ben Laurie 已提交
160
e_capi.o: ../include/openssl/asn1.h ../include/openssl/bio.h
B
Bodo Möller 已提交
161 162 163 164 165 166 167 168 169 170 171
e_capi.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
e_capi.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
e_capi.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
e_capi.o: ../include/openssl/engine.h ../include/openssl/evp.h
e_capi.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
e_capi.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
e_capi.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
e_capi.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
e_capi.o: ../include/openssl/sha.h ../include/openssl/stack.h
e_capi.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
e_capi.o: ../include/openssl/x509_vfy.h e_capi.c
M
Matt Caswell 已提交
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
e_dasync.o: ../include/openssl/asn1.h ../include/openssl/async.h
e_dasync.o: ../include/openssl/bio.h ../include/openssl/bn.h
e_dasync.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
e_dasync.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
e_dasync.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
e_dasync.o: ../include/openssl/engine.h ../include/openssl/err.h
e_dasync.o: ../include/openssl/evp.h ../include/openssl/lhash.h
e_dasync.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
e_dasync.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
e_dasync.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
e_dasync.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
e_dasync.o: ../include/openssl/sha.h ../include/openssl/stack.h
e_dasync.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
e_dasync.o: ../include/openssl/x509_vfy.h e_dasync.c e_dasync_err.c
e_dasync.o: e_dasync_err.h
B
Ben Laurie 已提交
187 188 189
e_gmp.o: ../include/openssl/asn1.h ../include/openssl/bio.h
e_gmp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
e_gmp.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
B
Ben Laurie 已提交
190 191 192 193 194 195
e_gmp.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
e_gmp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
e_gmp.o: ../include/openssl/evp.h ../include/openssl/lhash.h
e_gmp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
e_gmp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
e_gmp.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
B
Ben Laurie 已提交
196
e_gmp.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
B
Ben Laurie 已提交
197 198 199
e_gmp.o: ../include/openssl/sha.h ../include/openssl/stack.h
e_gmp.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
e_gmp.o: ../include/openssl/x509_vfy.h e_gmp.c
M
Matt Caswell 已提交
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
e_ossltest.o: ../include/openssl/aes.h ../include/openssl/asn1.h
e_ossltest.o: ../include/openssl/bio.h ../include/openssl/buffer.h
e_ossltest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
e_ossltest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
e_ossltest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
e_ossltest.o: ../include/openssl/err.h ../include/openssl/evp.h
e_ossltest.o: ../include/openssl/lhash.h ../include/openssl/md5.h
e_ossltest.o: ../include/openssl/modes.h ../include/openssl/obj_mac.h
e_ossltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
e_ossltest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
e_ossltest.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
e_ossltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
e_ossltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
e_ossltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
e_ossltest.o: e_ossltest.c e_ossltest_err.c e_ossltest_err.h
A
Andy Polyakov 已提交
215
e_padlock.o: ../include/openssl/aes.h ../include/openssl/asn1.h
B
Ben Laurie 已提交
216 217 218 219
e_padlock.o: ../include/openssl/bio.h ../include/openssl/buffer.h
e_padlock.o: ../include/openssl/crypto.h ../include/openssl/dso.h
e_padlock.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
e_padlock.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
A
Andy Polyakov 已提交
220 221
e_padlock.o: ../include/openssl/engine.h ../include/openssl/err.h
e_padlock.o: ../include/openssl/evp.h ../include/openssl/lhash.h
B
Bodo Möller 已提交
222 223 224 225 226 227 228 229
e_padlock.o: ../include/openssl/modes.h ../include/openssl/obj_mac.h
e_padlock.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
e_padlock.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
e_padlock.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
e_padlock.o: ../include/openssl/safestack.h ../include/openssl/sha.h
e_padlock.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
e_padlock.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
e_padlock.o: e_padlock.c