X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=Makefile;h=d569a5fb3b0f7b4d4022f14c7abdfac8045e6911;hp=199830f074877524bfe024eafdf16fb5536af04c;hb=69d6349f8ad9d35c2acdb4e4e38ad42cd28b426c;hpb=02ac3b653f3a11f284cc1a0cb0e983575f2f431b diff --git a/Makefile b/Makefile index 199830f..d569a5f 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ define TargetSource_Template $(1): $(2) @echo "[cc]: $(1) <-- $(2)" @mkdir -p $(dir $(1)) - @$(CC) $(CFLAGS_A) -I./$(strip $(3)) -c -o $(1) $(2) + @$(CC) $(CFLAGS_A) $(addprefix -I./,$(3)) $(addprefix -D, $(4)) -c -o $(1) $(2) endef # ---------------------------------------------------------------------------- @@ -92,8 +92,9 @@ $(foreach a, $(ALGORITHMS), \ $(foreach b, $($(a)_OBJ), \ $(eval $(call TargetSource_Template, \ $(BIN_DIR)$(call lc, $(a))/$(b), \ - $(call find_source_file, $(b), $($(a)_DIR) $($(a)_INCDIR) $(GLOBAL_INCDIR) ),\ - $($(a)_DIR) \ + $(call find_source_file, $(b), $($(a)_DIR) $($(a)_INCDIR) $(GLOBAL_INCDIR) ),\ + $($(a)_DIR) $($(a)_INCDIR) $(GLOBAL_INCDIR), \ + $($(a)_DEF), \ )) \ ) \ ) @@ -102,8 +103,9 @@ $(foreach a, $(ALGORITHMS), \ $(foreach b, $($(a)_TEST_BIN), \ $(eval $(call TargetSource_Template, \ $(BIN_DIR)$(call lc, $(a))/$(TEST_DIR)$(b), \ - $(call find_source_file, $(b), $($(a)_DIR) $($(a)_INCDIR) $(GLOBAL_INCDIR) ),\ - $($(a)_DIR) \ + $(call find_source_file, $(b), $($(a)_DIR) $($(a)_INCDIR) $(GLOBAL_INCDIR) ),\ + $($(a)_DIR) $($(a)_INCDIR) $(GLOBAL_INCDIR), \ + $($(a)_DEF) \ )) \ ) \ ) @@ -134,7 +136,7 @@ all: $(foreach algo, $(ALGORITHMS), $($(algo)_BINOBJ)) #------------------------------------------------------------------------------- define TestBin_TEMPLATE -$(1)_TEST_BIN: $(2) +$(1)_TESTBIN: $(2) endef $(foreach algo, $(ALGORITHMS), $(eval $(call TestBin_TEMPLATE, \ @@ -226,6 +228,9 @@ $(foreach algo, $(ALGORITHMS), \ ))\ ) +.PHONY: all +all: cores + .PHONY: cores cores: $(foreach algo, $(ALGORITHMS), $(algo)_OBJ) @@ -296,7 +301,7 @@ info: @echo " docu - build doxygen documentation" @echo " clean - remove a lot of builded files" @echo " depclean - also remove dependency files" - @echo " *_TEST_BIN - build test program" + @echo " *_TESTBIN - build test program" @echo " *_TESTRUN - run nessie test" @echo " *_OBJ - build algorithm core" @echo " *_FLASH - flash test program"