RFC 3161 compliant time stamp request creation, response generation
[openssl.git] / engines / Makefile
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 PEX_LIBS=
14 EX_LIBS=
15
16 CFLAGS= $(INCLUDES) $(CFLAG)
17
18 GENERAL=Makefile engines.com install.com engine_vector.mar
19 TEST=
20 APPS=
21
22 LIB=$(TOP)/libcrypto.a
23 LIBNAMES= 4758cca aep atalla cswift gmp chil nuron sureware ubsec
24
25 LIBSRC= e_4758cca.c \
26         e_aep.c \
27         e_atalla.c \
28         e_cswift.c \
29         e_gmp.c \
30         e_chil.c \
31         e_nuron.c \
32         e_sureware.c \
33         e_ubsec.c
34 LIBOBJ= e_4758cca.o \
35         e_aep.o \
36         e_atalla.o \
37         e_cswift.o \
38         e_gmp.o \
39         e_chil.o \
40         e_nuron.o \
41         e_sureware.o \
42         e_ubsec.o
43
44 SRC= $(LIBSRC)
45
46 EXHEADER= 
47 HEADER= e_4758cca_err.c e_4758cca_err.h \
48         e_aep_err.c e_aep_err.h \
49         e_atalla_err.c e_atalla_err.h \
50         e_cswift_err.c e_cswift_err.h \
51         e_gmp_err.c e_gmp_err.h \
52         e_chil_err.c e_chil_err.h \
53         e_nuron_err.c e_nuron_err.h \
54         e_sureware_err.c e_sureware_err.h \
55         e_ubsec_err.c e_ubsec_err.h
56
57 ALL=    $(GENERAL) $(SRC) $(HEADER)
58
59 top:
60         (cd ..; $(MAKE) DIRS=$(DIR) all)
61
62 all:    lib
63
64 lib:    $(LIBOBJ)
65         @if [ -n "$(SHARED_LIBS)" ]; then \
66                 set -e; \
67                 for l in $(LIBNAMES); do \
68                         $(MAKE) -f ../Makefile.shared -e \
69                                 LIBNAME=$$l LIBEXTRAS=e_$$l.o \
70                                 LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
71                                 link_o.$(SHLIB_TARGET); \
72                 done; \
73         else \
74                 $(AR) $(LIB) $(LIBOBJ); \
75                 $(RANLIB) $(LIB) || echo Never mind.; \
76         fi; \
77         touch lib
78
79 files:
80         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
81
82 links:
83
84 # XXXXX This currently only works on systems that use .so as suffix
85 # for shared libraries as well as for Cygwin which uses the
86 # dlfcn_name_converter and therefore stores the engines with .so suffix, too.
87 # XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
88 install:
89         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
90         @if [ -n "$(SHARED_LIBS)" ]; then \
91                 set -e; \
92                 for l in $(LIBNAMES); do \
93                         ( echo installing $$l; \
94                           if [ "$(PLATFORM)" != "Cygwin" ]; then \
95                                 case "$(CFLAGS)" in \
96                                 *DSO_DLFCN*)    sfx="so";;      \
97                                 *DSO_DL*)       sfx="sl";;      \
98                                 *)              sfx="bad";;     \
99                                 esac; \
100                                 cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
101                           else \
102                                 sfx="so"; \
103                                 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
104                           fi; \
105                           chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
106                           mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
107                 done; \
108         fi
109
110 tags:
111         ctags $(SRC)
112
113 errors:
114         set -e; for l in $(LIBNAMES); do \
115                 $(PERL) ../util/mkerr.pl -conf e_$$l.ec \
116                         -nostatic -staticloader -write e_$$l.c; \
117         done
118
119 tests:
120
121 lint:
122         lint -DLINT $(INCLUDES) $(SRC)>fluff
123
124 depend:
125         @if [ -z "$(THIS)" ]; then \
126             $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \
127         else \
128             $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC); \
129         fi
130
131 dclean:
132         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
133         mv -f Makefile.new $(MAKEFILE)
134
135 clean:
136         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
137
138 # DO NOT DELETE THIS LINE -- make depend depends on it.