-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
52 lines (37 loc) · 1.43 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
## file guifltk-refpersys/Makefile for GNU make
## © Copyright 2023 Basile Starynkevitch
##
CXX= g++
ASTYLE= astyle
ASTYLEFLAGS= -v --style=gnu
DESTDIR= /usr/local
RM= /bin/rm -vf
GIT_ID:= $(shell ./do-generate-gitid.sh)
SHORTGIT_ID:= $(shell ./do-generate-gitid.sh -s)
CXXFLAGS= -O2 -g3 -I /usr/local/include/ \
$(shell pkg-config --cflags jsoncpp) \
$(shell fltk-config --cxxflags) \
-DGIT_ID=\"$(GIT_ID)\" -DSHORTGIT_ID=\"$(SHORTGIT_ID)\" \
-DBUILD_HOST=\"$(shell hostname -f)\"
################################################################
## the install target is installing in $DESTDIR/bin
## the homeinstall target is installing in $HOME/bin
.PHONY: all objects clean indent homeinstall install
all: guifltkrps
clean:
$(RM) *.o *~ *.orig guifltkrps a.out
indent:
for f in *.hh ; do $(ASTYLE) $(ASTYLEFLAGS) $$f ; done
for f in *.cc ; do $(ASTYLE) $(ASTYLEFLAGS) $$f ; done
homeinstall: guifltkrps
install --backup --preserve-timestamps guifltkrps $$HOME/bin/
install: guifltkrps
sudo /usr/bin/install --backup --preserve-timestamps guifltkrps $(DESTDIR)/bin/
guifltkrps: progfltk.o jsonrpsfltk.o
$(LINK.cc) -o $@ -O2 -g3 progfltk.o jsonrpsfltk.o \
$(shell pkg-config --cflags jsoncpp) \
$(shell fltk-config --ldflags) \
-lunistring
progfltk.o: progfltk.cc fltkrps.hh
jsonrpsfltk.o: jsonrpsfltk.cc fltkrps.hh
#### end of guifltk-refpersys/Makefile