Makefile.in 3.4 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

16 17
ENGINES_ASM_OBJ=

18 19
PEX_LIBS=
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 \
37
	$(ENGINES_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='-L.. -lcrypto $(EX_LIBS)' \
66 67 68 69 70 71
				link_o.$(SHLIB_TARGET); \
		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; \
D
Dr. Stephen Henson 已提交
91
		$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
92
		for l in $(LIBNAMES); do \
G
Geoff Thorpe 已提交
93
			( echo installing $$l; \
94
			  pfx=lib; \
95 96 97 98
			  if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
				sfx=".so"; \
				cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
			  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; \
D
Dr. Stephen Henson 已提交
105
				cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
106
			  fi; \
D
Dr. Stephen Henson 已提交
107 108
			  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 ); \
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

118 119 120 121 122
update: local_depend
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi

depend: local_depend
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
M
Matt Caswell 已提交
123

124
local_depend:
125
	@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
126 127

clean:
128
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
129 130

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