mirror of
https://github.com/openssl/openssl.git
synced 2024-12-09 05:51:54 +08:00
d10dac1187
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
155 lines
4.0 KiB
Makefile
155 lines
4.0 KiB
Makefile
#
|
|
# apps/Makefile
|
|
#
|
|
|
|
DIR= apps
|
|
TOP= ..
|
|
CC= cc
|
|
INCLUDES= -I$(TOP) -I../crypto -I../include
|
|
CFLAG= -g -static -Wswitch
|
|
MAKEFILE= Makefile
|
|
PERL= perl
|
|
RM= rm -f
|
|
|
|
PEX_LIBS=
|
|
EX_LIBS=
|
|
EXE_EXT=
|
|
|
|
SHLIB_TARGET=
|
|
|
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
|
|
|
GENERAL=Makefile makeapps.com install.com
|
|
|
|
DLIBCRYPTO=../libcrypto.a
|
|
DLIBSSL=../libssl.a
|
|
LIBCRYPTO=-L.. -lcrypto
|
|
LIBSSL=-L.. -lssl
|
|
|
|
SCRIPTS=CA.pl tsget
|
|
EXE= openssl$(EXE_EXT)
|
|
|
|
COMMANDS= \
|
|
asn1pars.o ca.o ciphers.o cms.o crl.o crl2p7.o dgst.o dhparam.o \
|
|
dsa.o dsaparam.o ec.o ecparam.o enc.o engine.o errstr.o gendsa.o \
|
|
genpkey.o genrsa.o nseq.o ocsp.o passwd.o pkcs12.o pkcs7.o pkcs8.o \
|
|
pkey.o pkeyparam.o pkeyutl.o prime.o rand.o req.o rsa.o rsautl.o \
|
|
s_client.o s_server.o s_time.o sess_id.o smime.o speed.o spkac.o \
|
|
srp.o ts.o verify.o version.o x509.o rehash.o
|
|
|
|
EXTRA_OBJ=apps.o opt.o s_cb.o s_socket.o
|
|
EXTRA_SRC=apps.c opt.c s_cb.c s_socket.c
|
|
RAND_OBJ=app_rand.o
|
|
RAND_SRC=app_rand.c
|
|
|
|
OBJ = $(COMMANDS)
|
|
|
|
SRC = \
|
|
asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c \
|
|
dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c \
|
|
genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c \
|
|
pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c \
|
|
s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c \
|
|
srp.c ts.c verify.c version.c x509.c
|
|
|
|
EXE_OBJ = openssl.o $(OBJ) $(EXTRA_OBJ) $(RAND_OBJ)
|
|
EXE_SRC = openssl.c $(SRC) $(EXTRA_SRC) $(RAND_SRC)
|
|
|
|
HEADER= apps.h progs.h s_apps.h \
|
|
testdsa.h testrsa.h timeouts.h
|
|
|
|
ALL= $(GENERAL) $(EXE_SRC) $(HEADER)
|
|
|
|
top:
|
|
@(cd ..; $(MAKE) DIRS=$(DIR) all)
|
|
|
|
all: exe
|
|
|
|
exe: $(EXE)
|
|
|
|
openssl-vms.cnf: openssl.cnf
|
|
$(PERL) $(TOP)/VMS/VMSify-conf.pl < openssl.cnf > openssl-vms.cnf
|
|
|
|
files:
|
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
|
|
|
install:
|
|
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
|
@set -e; for i in $(EXE); \
|
|
do \
|
|
(echo installing $$i; \
|
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
|
|
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
|
|
done;
|
|
@set -e; for i in $(SCRIPTS); \
|
|
do \
|
|
(echo installing $$i; \
|
|
cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
|
|
chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
|
|
mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
|
|
done
|
|
@cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
|
|
chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
|
|
mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
|
|
|
|
uninstall:
|
|
@set -e; for i in $(EXE); \
|
|
do \
|
|
echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
|
|
$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
|
|
done;
|
|
@set -e; for i in $(SCRIPTS); \
|
|
do \
|
|
echo $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
|
|
$(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
|
|
done
|
|
$(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
|
|
|
|
tags:
|
|
ctags $(EXE_SRC) $(HEADER)
|
|
|
|
tests:
|
|
|
|
lint:
|
|
echo nope >fluff
|
|
|
|
update: openssl-vms.cnf local_depend
|
|
|
|
depend: local_depend
|
|
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
|
local_depend:
|
|
@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(EXE_SRC)
|
|
|
|
dclean:
|
|
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
|
mv -f Makefile.new $(MAKEFILE)
|
|
|
|
clean:
|
|
rm -f *.o *.obj *.dll lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
|
|
rm -f req
|
|
|
|
$(DLIBSSL):
|
|
(cd ..; $(MAKE) build_libssl)
|
|
|
|
$(DLIBCRYPTO):
|
|
(cd ..; $(MAKE) build_libcrypto)
|
|
|
|
$(EXE): progs.h $(EXE_OBJ) $(DLIBCRYPTO) $(DLIBSSL)
|
|
$(RM) $(EXE)
|
|
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
|
shlib_target="$(SHLIB_TARGET)"; \
|
|
fi; \
|
|
LIBRARIES="$(LIBSSL) $(LIBCRYPTO)" ; \
|
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
|
APPNAME=$(EXE) OBJECTS="$(EXE_OBJ)" \
|
|
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
|
|
link_app.$${shlib_target}
|
|
|
|
progs.h: progs.pl Makefile
|
|
$(RM) progs.h
|
|
$(PERL) progs.pl $(COMMANDS) >progs.h
|
|
$(RM) openssl.o
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|