summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorroot <root@lab2.panaceas.james.local>2014-11-02 10:57:51 +0000
committerroot <root@lab2.panaceas.james.local>2014-11-02 10:57:51 +0000
commit38003ce02f2492d1f4e24ec03167db0725cd69ce (patch)
tree21875b447e28fdd418581f938fea8160349460d4 /src/Makefile
parent1dc7d758f96dd2b9bd7b03f01ca032d68b696cf0 (diff)
downloadstm32_usb_kvm-38003ce02f2492d1f4e24ec03167db0725cd69ce.tar.gz
stm32_usb_kvm-38003ce02f2492d1f4e24ec03167db0725cd69ce.tar.bz2
stm32_usb_kvm-38003ce02f2492d1f4e24ec03167db0725cd69ce.zip
fish
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index c833404..5927739 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,15 +17,27 @@
## along with this library. If not, see <http://www.gnu.org/licenses/>.
##
+CPROTO=cproto
+PROG=kvm
+
V=1
-default: usbhid.hex
+default: ${PROG}.elf
+CSRCS=dfu.c hid.c main.c usb.c
-BINARY = usbhid
-LDSCRIPT = ../stm32-h103.ld
+BINARY = ${PROG}
+OBJS = ${CSRCS:%.c=%.o}
-include ../Makefile.include
+program: ${PROG}.elf
+ echo halt | nc -t localhost 4444
+ echo flash write_image erase ${PWD}/$< | nc -t localhost 4444
+ echo reset run | nc -t localhost 4444
-program: usbhid.hex
+protos:
+ echo -n > prototypes.h
+ ${CPROTO} $(INCLUDES) $(DEFINES) -e -v ${CSRCS} > prototypes.h.tmp
+ mv -f prototypes.h.tmp prototypes.h
+
+include ../Makefile.include