Makefile.in 3.3 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 15
AR=		ar r

R
Richard Levitte 已提交
16
PADLOCK_ASM_OBJ=
17

18
PLIB_LDFLAG=
19
EX_LIBS=
20

21
CFLAGS= $(INCLUDES) $(CFLAG)
22
ASFLAGS= $(INCLUDES) $(ASFLAG)
23
AFLAGS= $(ASFLAGS)
24

R
Richard Levitte 已提交
25
GENERAL=Makefile engines.com install.com engine_vector.mar
26 27

LIB=$(TOP)/libcrypto.a
R
Rich Salz 已提交
28 29
LIBNAMES= padlock capi dasync
LIBSRC=	\
30
	e_padlock.c \
M
Matt Caswell 已提交
31 32
	e_capi.c \
	e_dasync.c
R
Rich Salz 已提交
33
LIBOBJ= \
34
	e_padlock.o \
35
	e_capi.o \
M
Matt Caswell 已提交
36
	e_dasync.o \
R
Richard Levitte 已提交
37
	$(PADLOCK_ASM_OBJ)
38

39 40 41 42
TESTLIBNAMES= ossltest
TESTLIBSRC= e_ossltest.c
TESTLIBOBJ= e_ossltest.o

43 44
SRC= $(LIBSRC)

R
Rich Salz 已提交
45
HEADER=	\
46
	e_chil_err.c e_chil_err.h \
47
	e_ubsec_err.c e_ubsec_err.h \
M
Matt Caswell 已提交
48
	e_capi_err.c e_capi_err.h \
M
Matt Caswell 已提交
49 50
	e_ossltest_err.c e_ossltest_err.h \
	e_dasync_err.c e_dasync_err.h
51

52
ALL=	$(GENERAL) $(SRC) $(HEADER)
53 54 55 56

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

M
Matt Caswell 已提交
57
all:	lib
58

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

74 75 76 77 78
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) > $@

79
files:
B
Ben Laurie 已提交
80
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
81 82

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

errors:
	set -e; for l in $(LIBNAMES); do \
		$(PERL) ../util/mkerr.pl -conf e_$$l.ec \
			-nostatic -staticloader -write e_$$l.c; \
	done

R
Rich Salz 已提交
118
depend:
119
	@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
R
Rich Salz 已提交
120
	@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
121 122

clean:
123
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
124 125

# DO NOT DELETE THIS LINE -- make depend depends on it.