Permalink
Browse files

add header files to make dependencies

  • Loading branch information...
beerriot committed Feb 28, 2011
1 parent d3a5cc7 commit 21463c607bcc341b2517d5fbd574fad612c5d6d1
Showing with 10 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +9 −2 Makefile
View
@@ -1,5 +1,6 @@
*~
*.o
+*.d
*.hex
*.ass
blockgame
View
@@ -1,4 +1,4 @@
-VPATH=src
+VPATH=src:include
CC=avr-gcc
LIBNERDKITS=../libnerdkits
CFLAGS=-g -Os -Wall -mmcu=atmega168 -Iinclude -I$(LIBNERDKITS)
@@ -23,4 +23,11 @@ blockgame.ass: blockgame
.PHONY: clean
clean:
- -rm *.o blockgame blockgame.hex blockgame.ass
+ -rm *.o *.d blockgame blockgame.hex blockgame.ass
+
+-include $(OBJECTS:%.o=%.d)
+
+deps: $(OBJECTS:%.o=%.d)
+
+%.d: %.c
+ $(CC) $(CFLAGS) -MM $< > $@

0 comments on commit 21463c6

Please sign in to comment.