Make formatting consistent in apps/Makefile.in
[openssl.git] / apps / Makefile.in
1 #
2 #  apps/Makefile
3 #
4
5 DIR=            apps
6 TOP=            ..
7 CC=             cc
8 INCLUDES=       -I$(TOP) -I../crypto -I../include
9 CFLAG=          -g -static -Wswitch
10 MAKEFILE=       Makefile
11 PERL=           perl
12 RM=             rm -f
13
14 PLIB_LDFLAG=
15 EX_LIBS= 
16 EXE_EXT= 
17
18 APPS_OBJ=
19
20 SHLIB_TARGET=
21
22 CFLAGS= $(INCLUDES) $(CFLAG)
23
24 GENERAL=Makefile makeapps.com install.com
25
26 DLIBCRYPTO=../libcrypto.a
27 DLIBSSL=../libssl.a
28 LIBCRYPTO=-L.. -lcrypto
29 LIBSSL=-L.. -lssl
30
31 SCRIPTS=CA.pl tsget
32 EXE= openssl$(EXE_EXT)
33 CONFS=openssl.cnf ct_log_list.cnf
34
35 COMMANDS= \
36         asn1pars.o ca.o ciphers.o cms.o crl.o crl2p7.o dgst.o dhparam.o \
37         dsa.o dsaparam.o ec.o ecparam.o enc.o engine.o errstr.o gendsa.o \
38         genpkey.o genrsa.o nseq.o ocsp.o passwd.o pkcs12.o pkcs7.o pkcs8.o \
39         pkey.o pkeyparam.o pkeyutl.o prime.o rand.o req.o rsa.o rsautl.o \
40         s_client.o s_server.o s_time.o sess_id.o smime.o speed.o spkac.o \
41         srp.o ts.o verify.o version.o x509.o rehash.o
42
43 EXTRA_OBJ=apps.o opt.o s_cb.o s_socket.o
44 EXTRA_SRC=apps.c opt.c s_cb.c s_socket.c
45 RAND_OBJ=app_rand.o
46 RAND_SRC=app_rand.c
47
48 OBJ     = $(COMMANDS)
49
50 SRC     = \
51         asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c \
52         dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c \
53         genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c \
54         pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c \
55         s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c \
56         srp.c ts.c verify.c version.c x509.c rehash.c
57
58 EXE_OBJ = openssl.o $(OBJ) $(EXTRA_OBJ) $(RAND_OBJ) $(APPS_OBJ)
59 EXE_SRC = openssl.c $(SRC) $(EXTRA_SRC) $(RAND_SRC)
60
61 HEADER= apps.h progs.h s_apps.h \
62         testdsa.h testrsa.h timeouts.h
63
64 ALL=    $(GENERAL) $(EXE_SRC) $(HEADER)
65
66 top:
67         @(cd ..; $(MAKE) DIRS=$(DIR) all)
68
69 all:    exe scripts
70
71 exe:    $(EXE)
72
73 scripts: $(SCRIPTS)
74
75 openssl-vms.cnf: openssl.cnf
76         $(PERL) $(TOP)/VMS/VMSify-conf.pl < openssl.cnf > openssl-vms.cnf
77
78 files:
79         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
80
81 install:
82         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
83         @set -e; for i in $(EXE); \
84         do \
85                 echo installing $$i; \
86                 cp $$i $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \
87                 chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \
88                 mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$i.new $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
89         done
90         @set -e; for i in $(SCRIPTS); \
91         do \
92                 echo installing $$i; \
93                 cp $$i $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
94                 chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
95                 mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
96         done
97         @set -e; for i in $(CONFS); \
98         do \
99                 echo installing $$i; \
100                 cp $$i $(DESTDIR)$(OPENSSLDIR)/$$i.new; \
101                 chmod 644 $(DESTDIR)$(OPENSSLDIR)/$$i.new; \
102                 mv -f $(DESTDIR)$(OPENSSLDIR)/$$i.new $(DESTDIR)$(OPENSSLDIR)/$$i; \
103         done
104
105 uninstall:
106         @set -e; for i in $(EXE); \
107         do \
108                 echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
109                 $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
110         done
111         @set -e; for i in $(SCRIPTS); \
112         do \
113                 echo $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
114                 $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
115         done
116         @set -e; for i in $(CONFS); \
117         do \
118                 echo $(RM) $(DESTDIR)$(OPENSSLDIR)/$$i; \
119                 $(RM) $(DESTDIR)$(OPENSSLDIR)/$$i; \
120         done
121
122 generate: openssl-vms.cnf progs.h
123
124 depend:
125         $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(EXE_SRC)
126
127 clean:
128         rm -f *.o *.obj *.dll lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
129         rm -f req
130
131 $(DLIBSSL):
132         (cd ..; $(MAKE) build_libssl)
133
134 $(DLIBCRYPTO):
135         (cd ..; $(MAKE) build_libcrypto)
136
137 $(EXE): $(EXE_OBJ) $(DLIBCRYPTO) $(DLIBSSL)
138         $(RM) $(EXE)
139         shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
140                 shlib_target="$(SHLIB_TARGET)"; \
141         fi; \
142         LIBRARIES="$(LIBSSL) $(LIBCRYPTO)" ; \
143         $(MAKE) -f $(TOP)/Makefile.shared -e \
144                 APPNAME=$(EXE) OBJECTS="$(EXE_OBJ)" \
145                 LDFLAG="$(LDFLAG)" \
146                 LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
147                 link_app.$${shlib_target}
148
149 progs.h: progs.pl Makefile.in
150         $(RM) progs.h
151         $(PERL) progs.pl $(EXE_SRC) > progs.h
152
153 CA.pl: CA.pl.in
154         $(PERL) -I$(TOP) -Mconfigdata $(TOP)/util/dofile.pl -oapps/Makefile CA.pl.in > CA.pl.new
155         mv CA.pl.new CA.pl
156
157
158 # DO NOT DELETE THIS LINE -- make depend depends on it.