Merge pull request #132 from hin/header_dependencies
Header dependencies
This commit is contained in:
commit
e2e794af45
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
*.o
|
*.o
|
||||||
*.elf
|
*.elf
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
*.d
|
||||||
|
7
Makefile
7
Makefile
@ -49,6 +49,7 @@ all: grbl.hex
|
|||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(COMPILE) -c $< -o $@
|
$(COMPILE) -c $< -o $@
|
||||||
|
@$(COMPILE) -MM $< > $*.d
|
||||||
|
|
||||||
.S.o:
|
.S.o:
|
||||||
$(COMPILE) -x assembler-with-cpp -c $< -o $@
|
$(COMPILE) -x assembler-with-cpp -c $< -o $@
|
||||||
@ -74,7 +75,7 @@ load: all
|
|||||||
bootloadHID grbl.hex
|
bootloadHID grbl.hex
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f grbl.hex main.elf $(OBJECTS)
|
rm -f grbl.hex main.elf $(OBJECTS) $(OBJECTS:.o=.d)
|
||||||
|
|
||||||
# file targets:
|
# file targets:
|
||||||
main.elf: $(OBJECTS)
|
main.elf: $(OBJECTS)
|
||||||
@ -93,3 +94,7 @@ disasm: main.elf
|
|||||||
|
|
||||||
cpp:
|
cpp:
|
||||||
$(COMPILE) -E main.c
|
$(COMPILE) -E main.c
|
||||||
|
|
||||||
|
# include generated header dependencies
|
||||||
|
-include $(OBJECTS:.o=.d)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user