summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 260db1afa5859271c2515155b133b7bce4e6043c (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
TARGET=sntp
SRC=sntp.c log.c util.c

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

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

CFLAGS ?= -Wall -Werror -DDEBUG

$(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)