99ba822fb2fce56f37b57e10e7613e74df9ae80e
[openssl.git] / engines / Makefile.in
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
16 PADLOCK_ASM_OBJ=
17
18 PLIB_LDFLAG=
19 EX_LIBS=
20
21 CFLAGS= $(INCLUDES) $(CFLAG)
22 ASFLAGS= $(INCLUDES) $(ASFLAG)
23 AFLAGS= $(ASFLAGS)
24
25 GENERAL=Makefile engines.com install.com engine_vector.mar
26
27 LIB=$(TOP)/libcrypto.a
28 LIBNAMES= padlock capi dasync
29 LIBSRC= \
30         e_padlock.c \
31         e_capi.c \
32         e_dasync.c
33 LIBOBJ= \
34         e_padlock.o \
35         e_capi.o \
36         e_dasync.o \
37         $(PADLOCK_ASM_OBJ)
38
39 TESTLIBNAMES= ossltest
40 TESTLIBSRC= e_ossltest.c
41 TESTLIBOBJ= e_ossltest.o
42
43 SRC= $(LIBSRC)
44
45 HEADER= \
46         e_chil_err.c e_chil_err.h \
47         e_ubsec_err.c e_ubsec_err.h \
48         e_capi_err.c e_capi_err.h \
49         e_ossltest_err.c e_ossltest_err.h \
50         e_dasync_err.c e_dasync_err.h
51
52 ALL=    $(GENERAL) $(SRC) $(HEADER)
53
54 top:
55         (cd ..; $(MAKE) DIRS=$(DIR) all)
56
57 all:    lib
58
59 lib:    $(LIBOBJ) $(TESTLIBOBJ)
60         @if [ -n "$(SHARED_LIBS)" ]; then \
61                 set -e; \
62                 for l in $(LIBNAMES) $(TESTLIBNAMES); do \
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                 done; \
68         else \
69                 $(AR) $(LIB) $(LIBOBJ); \
70                 $(RANLIB) $(LIB) || echo Never mind.; \
71         fi; \
72         touch lib
73
74 e_padlock-x86.s:        asm/e_padlock-x86.pl
75         $(PERL) asm/e_padlock-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
76 e_padlock-x86_64.s:     asm/e_padlock-x86_64.pl
77         $(PERL) asm/e_padlock-x86_64.pl $(PERLASM_SCHEME) > $@
78
79 files:
80         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
81
82 install:
83         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
84         @if [ -n "$(SHARED_LIBS)" ]; then \
85                 set -e; \
86                 $(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
87                 for l in $(LIBNAMES); do \
88                         cp $${l}$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
89                         chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
90                         mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
91                 done; \
92         fi
93
94 uninstall:
95         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
96         @if [ -n "$(SHARED_LIBS)" ]; then \
97                 set -e; \
98                 for l in $(LIBNAMES); do \
99                         $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
100                 done; \
101         fi
102
103 errors:
104         set -e; for l in $(LIBNAMES); do \
105                 $(PERL) ../util/mkerr.pl -conf e_$$l.ec \
106                         -nostatic -staticloader -write e_$$l.c; \
107         done
108
109 depend:
110         @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
111         @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
112
113 clean:
114         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
115
116 # DO NOT DELETE THIS LINE -- make depend depends on it.