Browse Source

re-group demos and really build everything in 'all' target

Steffen Jaeckel 8 years ago
parent
commit
bffaab4eed
3 changed files with 16 additions and 15 deletions
  1. 0 6
      makefile
  2. 0 3
      makefile.shared
  3. 16 6
      makefile_include.mk

+ 0 - 6
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} $@"

+ 0 - 3
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)

+ 16 - 6
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)