blob: 8e1c0dd1cd91be5796832299c3724d43145a20ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
TARGET = zup
PREFIX = /usr
SRC = crc16.c serial.c repl.c cmd.c zup.c
OBJ = $(SRC:%.c=%.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)
.PHONY : install
install :
mkdir -p $(PREFIX)/bin
install $(TARGET) $(PREFIX)/bin/$(TARGET)
.PHONY : clean
clean :
rm $(TARGET) $(OBJ)
|