From bffaab4eed2a2ee1ef92176557e61ef57a0aa588 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 14 Jul 2017 12:18:18 +0200 Subject: [PATCH] re-group demos and really build everything in 'all' target --- makefile | 6 ------ makefile.shared | 3 --- makefile_include.mk | 22 ++++++++++++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/makefile b/makefile index e6ca27a..0e29fa4 100644 --- a/makefile +++ b/makefile @@ -63,12 +63,6 @@ ifneq ($V,1) endif ${silent} $(RANLIB) $@ -timing: $(LIBNAME) $(TIMINGS) -ifneq ($V,1) - @echo " * ${CC} $@" -endif - ${silent} $(CC) $(LTC_LDFLAGS) $(TIMINGS) $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TIMING) - test: $(LIBNAME) $(TOBJECTS) ifneq ($V,1) @echo " * ${CC} $@" diff --git a/makefile.shared b/makefile.shared index 95829af..d8b92b2 100644 --- a/makefile.shared +++ b/makefile.shared @@ -61,9 +61,6 @@ uninstall: .common_uninstall test: $(LIBNAME) $(TOBJECTS) $(LT) --mode=link --tag=CC $(CC) $(LTC_CFLAGS) $(CPPFLAGS) $(LTC_LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS) -timing: $(TIMINGS) $(LIBNAME) - $(LT) --mode=link --tag=CC $(CC) $(LTC_CFLAGS) $(CPPFLAGS) $(LTC_LDFLAGS) -o $(TIMING) $^ $(EXTRALIBS) - # build the demos from a template define DEMO_template $(1): demos/$(1).o $$(LIBNAME) diff --git a/makefile_include.mk b/makefile_include.mk index 24076d6..25beafe 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -124,14 +124,24 @@ DOBJECTS = $(DSOURCES:.c=.o) #List of tests headers THEADERS = $(wildcard tests/*.h) -TIMING=timing TEST=test -USEFUL_DEMOS=hashsum -UNBROKEN_DEMOS=$(USEFUL_DEMOS) ltcrypt small tv_gen sizes constants -DEMOS=$(UNBROKEN_DEMOS) openssl-enc +# Demos that are even somehow useful and could be installed as a system-tool +USEFUL_DEMOS = hashsum -TIMINGS=demos/timing.o +# Demos that are usable but only rarely make sense to be installed +USEABLE_DEMOS = ltcrypt sizes constants + +# Demos that are used for testing or measuring +TEST_DEMOS = small timing tv_gen + +# Demos that are in one config broken +# openssl-enc - can't be build with LTC_EASY +BROKEN_DEMOS = openssl-enc + +# Combine demos in groups +UNBROKEN_DEMOS = $(TEST_DEMOS) $(USEABLE_DEMOS) $(USEFUL_DEMOS) +DEMOS = $(UNBROKEN_DEMOS) $(BROKEN_DEMOS) #LIBPATH The directory for libtomcrypt to be installed to. #INCPATH The directory to install the header files for libtomcrypt. @@ -356,7 +366,7 @@ $(TOBJECTS): $(HEADERS) $(THEADERS) bins: $(USEFUL_DEMOS) -all: all_test +all: all_test $(BROKEN_DEMOS) all_test: test $(UNBROKEN_DEMOS)