summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJames <git@panaceas.org>2014-05-05 17:50:20 +0100
committerJames <git@panaceas.org>2014-05-05 17:50:20 +0100
commit470457e22a1b5537013603d5e367c51e47bb61bf (patch)
tree6b72d32bfd9eaec31c8c520d18782ccaebc01759 /Makefile
downloadkmd_usb-470457e22a1b5537013603d5e367c51e47bb61bf.tar.gz
kmd_usb-470457e22a1b5537013603d5e367c51e47bb61bf.tar.bz2
kmd_usb-470457e22a1b5537013603d5e367c51e47bb61bf.zip
fish
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..76953c5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+CSRCS=kmd.c status.c lcd.c input.c dispatch.c output.c map.c layout.c video_switch.c
+
+
+WHERE=$(shell hostname | sed -e 's/^.*medaka.james.local/BROMIUM/g' -e 's/^.*panaceas.*/HOME/g' )
+
+CFLAGS=-g -Wall -D${WHERE} -Wno-unused
+
+all: kmd
+
+%.o: %.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^
+
+OBJS=${CSRCS:%.c=%.o}
+
+
+kmd: ${OBJS} libdpf/libdpf.a
+ $(CC) -o $@ ${OBJS} libdpf/libdpf.a -lusb
+
+
+libdpf/libdpf.a:
+ make -C libdpf
+
+clean:
+ make -C libdpf clean
+ rm -f *.o kmd *~
+
+protos:
+ echo > prototypes.h
+ cproto -e -v ${CSRCS} >> prototypes.tmp
+ mv -f prototypes.tmp prototypes.h
+
+install: kmd
+ sleep 1
+ rsync -varP kmd /usr/local/bin/kmd
+ killall -9 kmd
+ telinit q
+
+
+
+