also build executables in makefile.shared from template
This commit is contained in:
parent
b465881b58
commit
ba338eced8
5
makefile
5
makefile
@ -180,11 +180,6 @@ src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h
|
|||||||
|
|
||||||
#END_INS
|
#END_INS
|
||||||
|
|
||||||
DEMOS=hashsum crypt small tv_gen multi sizes constants
|
|
||||||
|
|
||||||
TIMINGS=demos/timing.o
|
|
||||||
TESTS=demos/test.o
|
|
||||||
|
|
||||||
#Files left over from making the crypt.pdf.
|
#Files left over from making the crypt.pdf.
|
||||||
LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out *.lof
|
LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out *.lof
|
||||||
|
|
||||||
|
@ -81,6 +81,11 @@ TEST=test
|
|||||||
SIZES=sizes
|
SIZES=sizes
|
||||||
CONSTANTS=constants
|
CONSTANTS=constants
|
||||||
|
|
||||||
|
DEMOS=hashsum crypt small tv_gen multi sizes constants
|
||||||
|
|
||||||
|
TIMINGS=demos/timing.o
|
||||||
|
TESTS=demos/test.o
|
||||||
|
|
||||||
#LIBPATH-The directory for libtomcrypt to be installed to.
|
#LIBPATH-The directory for libtomcrypt to be installed to.
|
||||||
#INCPATH-The directory to install the header files for libtomcrypt.
|
#INCPATH-The directory to install the header files for libtomcrypt.
|
||||||
#DATAPATH-The directory to install the pdf docs.
|
#DATAPATH-The directory to install the pdf docs.
|
||||||
|
@ -170,13 +170,6 @@ src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h
|
|||||||
|
|
||||||
#END_INS
|
#END_INS
|
||||||
|
|
||||||
HASHOBJECTS=demos/hashsum.o
|
|
||||||
CRYPTOBJECTS=demos/encrypt.o
|
|
||||||
SMALLOBJECTS=demos/small.o
|
|
||||||
TVS=demos/tv_gen.o
|
|
||||||
TESTS=demos/test.o
|
|
||||||
TIMINGS=demos/timing.o
|
|
||||||
|
|
||||||
#The default rule for make builds the libtomcrypt library.
|
#The default rule for make builds the libtomcrypt library.
|
||||||
default:library
|
default:library
|
||||||
|
|
||||||
@ -220,19 +213,6 @@ install_test: testprof/$(LIBTEST)
|
|||||||
install -d $(DESTDIR)$(INCPATH)
|
install -d $(DESTDIR)$(INCPATH)
|
||||||
cd testprof ; CFLAGS="$(CFLAGS)" VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) LT=$(LT) CC=$(CC) make -f makefile.shared install
|
cd testprof ; CFLAGS="$(CFLAGS)" VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) LT=$(LT) CC=$(CC) make -f makefile.shared install
|
||||||
|
|
||||||
#This rule makes the hash program included with libtomcrypt
|
|
||||||
hashsum: library $(HASHOBJECTS)
|
|
||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(HASH) $(HASHOBJECTS) $(LIBNAME) $(EXTRALIBS)
|
|
||||||
|
|
||||||
#makes the crypt program
|
|
||||||
crypt: library $(CRYPTOBJECTS)
|
|
||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(CRYPT) $(CRYPTOBJECTS) $(LIBNAME) $(EXTRALIBS)
|
|
||||||
|
|
||||||
small: library $(SMALLOBJECTS)
|
|
||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(SMALL) $(SMALLOBJECTS) $(LIBNAME) $(EXTRALIBS)
|
|
||||||
|
|
||||||
tv_gen: library $(TVS)
|
|
||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TV) $(TVS) $(LIBNAME) $(EXTRALIBS)
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: library testprof/$(LIBTEST) $(TESTS)
|
test: library testprof/$(LIBTEST) $(TESTS)
|
||||||
@ -241,7 +221,19 @@ test: library testprof/$(LIBTEST) $(TESTS)
|
|||||||
timing: library testprof/$(LIBTEST) $(TIMINGS)
|
timing: library testprof/$(LIBTEST) $(TIMINGS)
|
||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS)
|
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS)
|
||||||
|
|
||||||
all_test: test tv_gen hashsum crypt small timing
|
|
||||||
|
# build the demos from a template
|
||||||
|
define DEMO_template
|
||||||
|
$(1): demos/$(1).o library
|
||||||
|
ifneq ($V,1)
|
||||||
|
@echo " * $${CC} $$@"
|
||||||
|
endif
|
||||||
|
$$(LT) --mode=link --tag=CC $$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(LDFLAGS) -o $(1) $$< $$(LIBNAME) $$(EXTRALIBS)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
|
||||||
|
|
||||||
|
all_test: test tv_gen $(DEMOS)
|
||||||
|
|
||||||
# $Source$
|
# $Source$
|
||||||
# $Revision$
|
# $Revision$
|
||||||
|
Loading…
x
Reference in New Issue
Block a user