diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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) |