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>
88 lines
2.5 KiB
Makefile
88 lines
2.5 KiB
Makefile
DIR=ccgost
|
|
TOP=../..
|
|
CC=cc
|
|
INCLUDES= -I../../include
|
|
CFLAG=-g
|
|
MAKEFILE= Makefile
|
|
AR= ar r
|
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
|
LIB=$(TOP)/libcrypto.a
|
|
|
|
LIBSRC= gost2001.c gost2001_keyx.c gost89.c gost_ameth.c gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c gosthash.c gost_keywrap.c gost_md.c gost_pmeth.c gost_params.c
|
|
|
|
LIBOBJ= e_gost_err.o gost2001_keyx.o gost2001.o gost89.o gost_ameth.o gost_asn1.o gost_crypt.o gost_ctl.o gost_eng.o gosthash.o gost_keywrap.o gost_md.o gost_pmeth.o gost_params.o
|
|
|
|
SRC=$(LIBSRC)
|
|
|
|
LIBNAME=gost
|
|
|
|
top:
|
|
(cd $(TOP); $(MAKE) DIRS=engines sub_all)
|
|
|
|
all: lib
|
|
|
|
tags:
|
|
ctags $(SRC)
|
|
|
|
errors:
|
|
$(PERL) ../../util/mkerr.pl -conf gost.ec -nostatic -write $(SRC)
|
|
|
|
lib: $(LIBOBJ)
|
|
if [ -n "$(SHARED_LIBS)" ]; then \
|
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
|
LIBNAME=$(LIBNAME) \
|
|
LIBEXTRAS='$(LIBOBJ)' \
|
|
LIBDEPS='-L$(TOP) -lcrypto' \
|
|
link_o.$(SHLIB_TARGET); \
|
|
else \
|
|
$(AR) $(LIB) $(LIBOBJ); \
|
|
fi
|
|
@touch lib
|
|
|
|
install:
|
|
[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
|
if [ -n "$(SHARED_LIBS)" ]; then \
|
|
set -e; \
|
|
echo installing $(LIBNAME); \
|
|
pfx=lib; \
|
|
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
|
|
sfx=".so"; \
|
|
cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
|
else \
|
|
case "$(CFLAGS)" in \
|
|
*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
|
|
*DSO_DL*) sfx=".sl";; \
|
|
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
|
|
*) sfx=".bad";; \
|
|
esac; \
|
|
cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
|
fi; \
|
|
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
|
|
fi
|
|
|
|
tests:
|
|
|
|
update: local_depend
|
|
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
|
|
|
depend: local_depend
|
|
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
|
local_depend:
|
|
@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
|
|
|
files:
|
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
|
|
|
lint:
|
|
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
|
|
|
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 lib tags core .pure .nfs* *.old *.bak fluff *.so *.sl *.dll *.dylib
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|