use make internal macros
This commit is contained in:
parent
c0abe2a5dc
commit
6e484cd420
@ -255,20 +255,20 @@ $(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS)
|
|||||||
|
|
||||||
#Demo tools/utilities
|
#Demo tools/utilities
|
||||||
hashsum: demos/hashsum.o $(LIBMAIN_S)
|
hashsum: demos/hashsum.o $(LIBMAIN_S)
|
||||||
$(CC) demos/hashsum.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
crypt: demos/crypt.o $(LIBMAIN_S)
|
crypt: demos/crypt.o $(LIBMAIN_S)
|
||||||
$(CC) demos/crypt.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
small: demos/small.o $(LIBMAIN_S)
|
small: demos/small.o $(LIBMAIN_S)
|
||||||
$(CC) demos/small.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
tv_gen: demos/tv_gen.o $(LIBMAIN_S)
|
tv_gen: demos/tv_gen.o $(LIBMAIN_S)
|
||||||
$(CC) demos/tv_gen.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
|
|
||||||
#Tests + timing tests
|
#Tests + timing tests
|
||||||
timing: demos/timing.o $(LIBTEST_S) $(LIBMAIN_S)
|
timing: demos/timing.o $(LIBTEST_S) $(LIBMAIN_S)
|
||||||
$(CC) demos/timing.o $(LIBTEST_S) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
@echo NOTICE: start the tests by: timing.exe
|
@echo NOTICE: start the tests by: timing.exe
|
||||||
test: demos/test.o $(LIBMAIN_S) $(LIBTEST_S)
|
test: demos/test.o $(LIBMAIN_S) $(LIBTEST_S)
|
||||||
$(CC) demos/test.o $(LIBTEST_S) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
@echo NOTICE: start the tests by: test.exe
|
@echo NOTICE: start the tests by: test.exe
|
||||||
|
|
||||||
all: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) $(LIBTEST_S) hashsum crypt small tv_gen timing test
|
all: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) $(LIBTEST_S) hashsum crypt small tv_gen timing test
|
||||||
|
@ -263,11 +263,11 @@ timing: library $(LIBTEST) $(TIMINGS)
|
|||||||
|
|
||||||
# build the demos from a template
|
# build the demos from a template
|
||||||
define DEMO_template
|
define DEMO_template
|
||||||
$(1): demos/$(1).o library
|
$(1): demos/$(1).o $$(LIBNAME)
|
||||||
ifneq ($V,1)
|
ifneq ($V,1)
|
||||||
@echo " * $${CC} $$@"
|
@echo " * $${CC} $$@"
|
||||||
endif
|
endif
|
||||||
$$(LT) --mode=link --tag=CC $$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(LDFLAGS) -o $(1) $$< $$(LIBNAME) $$(EXTRALIBS)
|
$$(LT) --mode=link --tag=CC $$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(LDFLAGS) $$^ $$(EXTRALIBS) -o $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
|
$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
|
||||||
|
@ -258,20 +258,20 @@ $(LIBMAIN_S): $(OBJECTS)
|
|||||||
|
|
||||||
#Demo tools/utilities
|
#Demo tools/utilities
|
||||||
hashsum: demos/hashsum.o $(LIBMAIN_S)
|
hashsum: demos/hashsum.o $(LIBMAIN_S)
|
||||||
$(CC) demos/hashsum.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
ltcrypt: demos/ltcrypt.o $(LIBMAIN_S)
|
ltcrypt: demos/ltcrypt.o $(LIBMAIN_S)
|
||||||
$(CC) demos/ltcrypt.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
small: demos/small.o $(LIBMAIN_S)
|
small: demos/small.o $(LIBMAIN_S)
|
||||||
$(CC) demos/small.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
tv_gen: demos/tv_gen.o $(LIBMAIN_S)
|
tv_gen: demos/tv_gen.o $(LIBMAIN_S)
|
||||||
$(CC) demos/tv_gen.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
|
|
||||||
#Tests + timing tests
|
#Tests + timing tests
|
||||||
timing: demos/timing.o $(LIBTEST_S) $(LIBMAIN_S)
|
timing: demos/timing.o $(LIBTEST_S) $(LIBMAIN_S)
|
||||||
$(CC) demos/timing.o $(LIBTEST_S) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
@echo "NOTICE: start the timing tests by: ./timing"
|
@echo "NOTICE: start the timing tests by: ./timing"
|
||||||
test: demos/test.o $(LIBMAIN_S) $(LIBTEST_S)
|
test: demos/test.o $(LIBTEST_S) $(LIBMAIN_S)
|
||||||
$(CC) demos/test.o $(LIBTEST_S) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@
|
$(CC) $? $(LTC_LDFLAGS) -o $@
|
||||||
@echo "NOTICE: start the tests by: ./test"
|
@echo "NOTICE: start the tests by: ./test"
|
||||||
|
|
||||||
all: $(LIBMAIN_S) $(LIBTEST_S) hashsum ltcrypt small tv_gen timing test
|
all: $(LIBMAIN_S) $(LIBTEST_S) hashsum ltcrypt small tv_gen timing test
|
||||||
|
Loading…
Reference in New Issue
Block a user