Change the INSTALL documentation for unified builds
[openssl.git] / engines / Makefile.in
1 #
2 # OpenSSL/engines/Makefile
3 #
4
5 DIR=    engines
6 TOP=    ..
7 CC=     cc
8 INCLUDES= -I../include
9 CFLAG=-g
10 MAKEFILE=       Makefile
11 AR=             ar r
12
13 RECURSIVE_MAKE=[ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
14                     (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
15                     $(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
16                 done;
17
18 PADLOCK_ASM_OBJ=
19
20 PLIB_LDFLAG=
21 EX_LIBS=
22
23 CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
24 ASFLAGS= $(INCLUDES) $(ASFLAG)
25 AFLAGS= $(ASFLAGS)
26
27 GENERAL=Makefile engines.com install.com engine_vector.mar
28
29 LIB=$(TOP)/libcrypto.a
30 LIBNAMES= padlock capi dasync
31 LIBSRC= \
32         e_padlock.c \
33         e_capi.c \
34         e_dasync.c
35 LIBOBJ= \
36         e_padlock.o \
37         e_capi.o \
38         e_dasync.o \
39         $(PADLOCK_ASM_OBJ)
40
41 TESTLIBNAMES= ossltest
42 TESTLIBSRC= e_ossltest.c
43 TESTLIBOBJ= e_ossltest.o
44
45 SRC= $(LIBSRC)
46
47 HEADER= \
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 subdirs
58
59 lib:    $(LIBOBJ) $(TESTLIBOBJ)
60         @if [ "$(DYNAMIC_ENGINES)" = 1 ]; 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 subdirs:
80         @target=all; $(RECURSIVE_MAKE)
81
82 files:
83         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
84         @target=files; $(RECURSIVE_MAKE)
85
86 install:
87         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
88         @if [ -n "$(SHARED_LIBS)" ]; then \
89                 set -e; \
90                 $(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
91                 for l in $(LIBNAMES); do \
92                         cp $${l}$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
93                         chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
94                         mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
95                 done; \
96         fi
97         @target=install; $(RECURSIVE_MAKE)
98
99 uninstall:
100         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
101         @if [ -n "$(SHARED_LIBS)" ]; then \
102                 set -e; \
103                 for l in $(LIBNAMES); do \
104                         $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
105                 done; \
106         fi
107         @target=install; $(RECURSIVE_MAKE)
108
109 errors:
110         set -e; for l in $(LIBNAMES); do \
111                 $(PERL) ../util/mkerr.pl -conf e_$$l.ec \
112                         -nostatic -staticloader -write e_$$l.c; \
113         done
114
115 depend:
116         @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
117         @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
118
119 clean:
120         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
121         @target=clean; $(RECURSIVE_MAKE)
122
123 # DO NOT DELETE THIS LINE -- make depend depends on it.