forked from redlab-i/pps-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 715 Bytes
/
Makefile
File metadata and controls
39 lines (27 loc) · 715 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
39
TARGETS = ppstest ppsctl ppswatch ppsldisc
CFLAGS += -Wall -O2 -D_GNU_SOURCE
CFLAGS += -ggdb
CFLAGS += -fPIC
ifdef SYSROOT
CFLAGS += --sysroot $(SYSROOT)
endif
LDLIBS += -lm
# -- Actions section --
.PHONY : all depend dep
all : .depend $(TARGETS)
.depend depend dep :
$(CC) $(CFLAGS) -M $(TARGETS:=.c) > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
install : all
install -D -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
install -D -m 644 -t $(DESTDIR)/usr/include/sys timepps.h
uninstall :
for f in $(TARGETS); do rm $(DESTDIR)/usr/bin/$$f; done
rm $(DESTDIR)/usr/include/sys/timepps.h
# -- Clean section --
.PHONY : clean
clean :
rm -f *.o *~ core .depend
rm -f ${TARGETS}