forked from owntracks/ocli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (22 loc) · 772 Bytes
/
Makefile
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
CFLAGS+=-Wall -Werror -Wno-dangling-pointer -Os -I/usr/local/include
LDFLAGS=-L /usr/local/lib -lmosquitto -lgps -lm
OCLI = owntracks-cli-publisher
BINDIR = /usr/local/bin
MANDIR = /usr/local/man
OBJS = json.o
all: $(OCLI)
$(OCLI): $(OCLI).o $(OBJS)
$(CC) -o $(OCLI) $(OCLI).o $(OBJS) $(LDFLAGS)
json.o: json.c json.h
$(OCLI).o: json.h $(OCLI).c utarray.h utstring.h version.h
$(OCLI).pdf: $(OCLI).1
groff -Tps -man $(OCLI).1 > $(OCLI).tmp_ && pstopdf -i $(OCLI).tmp_ -o $(OCLI).pdf && rm -f $(OCLI).tmp_
install: $(OCLI) $(OCLI).1
install -d $(DESTDIR)$(BINDIR)
install -m755 $(OCLI) $(DESTDIR)$(BINDIR)/$(OCLI)
install -d $(DESTDIR)$(MANDIR)/man1
install -m644 $(OCLI).1 $(DESTDIR)$(MANDIR)/man1/$(OCLI).1
clean:
rm -f *.o
clobber: clean
rm -f $(OCLI)