diff --git a/build.mk b/build.mk index 31e9203..7453fe1 100644 --- a/build.mk +++ b/build.mk @@ -76,7 +76,7 @@ #(2) = source(s) #(3) = extra flags define COMPILE_ASM_SOURCE -$(1): $(2) | $(dir $(1)) +$(1): Makefile $(2) | $(dir $(1)) @echo Compiling $(2) ...; $(PREFIX)$(CC) -c $(3) -o $(1) $(2); $(EMPTY_LINE) @@ -88,7 +88,7 @@ #(2) = source(s) #(3) = extra flags define COMPILE_C_SOURCE -$(1): $(2) | $(dir $(1)) +$(1): Makefile $(2) | $(dir $(1)) @echo Compiling $(2) ...; $(PREFIX)$(CC) -c $(3) -MD -pipe -o $(1) $(2); $(EMPTY_LINE) @@ -102,7 +102,7 @@ #(2) = source(s) #(3) = extra flags define COMPILE_CXX_SOURCE -$(1): $(2) | $(dir $(1)) +$(1): Makefile $(2) | $(dir $(1)) @echo Compiling $(2) ...; $(PREFIX)$(CC) -c $(3) -MD -pipe -o $(1) $(2); $(EMPTY_LINE) @@ -125,7 +125,7 @@ .SUFFIXES: ifdef LINK_TARGET -$(BINDIR)/$(LINK_TARGET): $(ALLOBJS) $(LINKER_SCRIPT) | $(BINDIR)/ +$(BINDIR)/$(LINK_TARGET): Makefile $(ALLOBJS) $(LINKER_SCRIPT) | $(BINDIR)/ @echo "Linking ..." ifdef LINKER_SCRIPT $(CC) $(LDFLAGS) -o $(BINDIR)/$(LINK_TARGET) -T$(LINKER_SCRIPT) $(ALLOBJS) $(COMPONENT_LIBS) $(LIBS) @@ -136,7 +136,7 @@ endif -$(BINDIR)/$(TARGET).a: $(ALLOBJS) | $(BINDIR)/ +$(BINDIR)/$(TARGET).a: Makefile $(ALLOBJS) | $(BINDIR)/ @echo "Creating static library ..." $(AR) rcs $(BINDIR)/$(TARGET).a $(ALLOBJS) @echo