summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: c41aa632f304e7ee38df446b5b68fc1228e3725b (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=sntpc
SRC=sntpc.c log.c util.c

DISTFILES=$(SRC) Makefile ntp.h util.h log.h

VERSION=0.9
P=$(TARGET)-$(VERSION)

CFLAGS ?= -Wall -Werror -DDEBUG
CFLAGS += -DSNTPC_VERSION=\"$(VERSION)\"

$(TARGET): $(SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^

clean:
	rm -f $(TARGET)

tar: $(P).tar.gz

$(P).tar.gz: $(DISTFILES)
	rm -rf  $(P)
	mkdir -p $(P)
	cp $(DISTFILES) $(P)
	tar -czf $@ $(P)
	rm -rf $(P)