From b50e1f74202e18ea10f1f2cd46e9e02a9d4f0e65 Mon Sep 17 00:00:00 2001 From: Thomas Albers Date: Sun, 6 Aug 2023 10:01:18 +0200 Subject: Rewrite for new serial protocol --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3