File: Makefile

package info (click to toggle)
pps-tools 1.0.3-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 140 kB
  • sloc: ansic: 716; makefile: 30; sh: 10
file content (39 lines) | stat: -rw-r--r-- 715 bytes parent folder | download
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}