summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Albers <thomas@thomaslabs.org>2023-08-06 10:01:18 +0200
committerThomas Albers <thomas@thomaslabs.org>2023-08-06 10:01:18 +0200
commitb50e1f74202e18ea10f1f2cd46e9e02a9d4f0e65 (patch)
tree3b408615595bf82c2ac4f6ec62009ab2f05a6bd5 /Makefile
parent56157d2cc9385e5df65ba310abef2873429c8af5 (diff)
Rewrite for new serial protocol
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1ddf091..8e1c0dd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,18 @@
TARGET = zup
PREFIX = /usr
+SRC = crc16.c serial.c repl.c cmd.c zup.c
+OBJ = $(SRC:%.c=%.o)
-$(TARGET) : upload.c
- gcc -o $@ $<
+CFLAGS = -Werror -Wpedantic -I. -g -DUSE_READLINE
+LDFLAGS = -lreadline
+
+$(TARGET) : zup.h $(OBJ)
+ @echo ' (LD)' $(OBJ)
+ @gcc $(LDFLAGS) -o $@ $(OBJ)
+
+%.o : %.c zup.h
+ @echo ' (CC)' $<
+ @gcc $(CFLAGS) -c -o $@ $<
all : $(TARGET)
@@ -13,4 +23,4 @@ install :
.PHONY : clean
clean :
- rm $(TARGET)
+ rm $(TARGET) $(OBJ)