Fix generating header dependencies, merge with 'normal' compile, force recompile when files are removed.

This commit is contained in:
Martin Poelstra 2015-02-13 22:53:59 +01:00
parent 4bdc20ffb9
commit cff926f861

View File

@ -50,8 +50,7 @@ OBJECTS = $(addprefix $(BUILDDIR)/,$(notdir $(SOURCE:.c=.o)))
all: grbl.hex all: grbl.hex
$(BUILDDIR)/%.o: $(SOURCEDIR)/%.c $(BUILDDIR)/%.o: $(SOURCEDIR)/%.c
$(COMPILE) -c $< -o $@ $(COMPILE) -MMD -MP -c $< -o $@
@$(COMPILE) -MM $< > $(BUILDDIR)/$*.d
.S.o: .S.o:
$(COMPILE) -x assembler-with-cpp -c $< -o $(BUILDDIR)/$@ $(COMPILE) -x assembler-with-cpp -c $< -o $(BUILDDIR)/$@