blob: 110d284236450f6dbe19e8f664f3469eaeca3ed7 [file] [log] [blame]
vishwa5c912c82016-03-24 07:59:28 -05001CC?= $(CROSS_COMPILE)gcc
2
3EXE = netman_watch_dns
4EXE_OBJ = $(EXE).o
5
6INSTALLED_EXE += $(EXE)
7
8CFLAGS += -Wall -Wno-unused-result
9
10INC_FLAG += $(shell pkg-config --cflags --libs libsystemd) -I. -O2
11LIB_FLAG += $(shell pkg-config --libs libsystemd)
12
13DESTDIR ?= /
14SBINDIR ?= /usr/sbin
15
16all: $(EXE)
17
18%.o: %.C
19 $(CC) -c $< $(CFLAGS) $(INC_FLAG)-o $@
20
21$(EXE): $(EXE_OBJ)
22 $(CC) $^ $(LDFLAGS) $(LIB_FLAG) -o $@
23
24clean:
25 rm -f $(EXE) *.o
26
27install:
28 install -m 0755 -d $(DESTDIR)$(SBINDIR)
29 install -m 0755 $(EXE) $(DESTDIR)$(SBINDIR)