summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 64995ab..a7c401e 100644
--- a/Makefile
+++ b/Makefile
@@ -3,16 +3,17 @@ CSRCS=kmd.c status.c lcd.c input.c dispatch.c output.c map.c layout.c video_swit
WHERE=$(shell hostname | sed -e 's/^.*medaka.james.local/BROMIUM/g' -e 's/^.*panaceas.*/HOME/g' )
-CPPFLAGS=-D${WHERE}
-CFLAGS=-g -Wall -Wno-unused
+CFLAGS=-g -Wall -D${WHERE} -Wno-unused
all: kmd
-%.o: %.c
- $(CC) ${CPPFLAGS} $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^
+%.o: %.c project.h
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ ${@:%.o=%.c}
OBJS=${CSRCS:%.c=%.o}
+output.o:output_map.h output.c
+
kmd: ${OBJS} libdpf/libdpf.a
$(CC) -o $@ ${OBJS} libdpf/libdpf.a -lusb
@@ -27,7 +28,7 @@ clean:
protos:
echo > prototypes.h
- cproto -e -v ${CPPFLAGS} ${CSRCS} >> prototypes.tmp
+ cproto -e -v ${CSRCS} >> prototypes.tmp
mv -f prototypes.tmp prototypes.h
install: kmd
@@ -38,4 +39,4 @@ install: kmd
-
+output.o: output_map.h