summaryrefslogtreecommitdiff
blob: ca5c5dded4a1c81fd6e60a954f075f51d37413ce (plain)
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
BINS = request
OBJS = $(addsuffix .o,$(BINS))
PKGCONFIG_MODULES = json
MISSING_PLUGINS_LIBS = 
LIBS_PKGCONFIG := $(foreach mod,$(PKGCONFIG_MODULES),$(shell pkg-config --libs $(mod)))
CXXFLAGS_PKGCONFIG := $(foreach mod,$(PKGCONFIG_MODULES),$(shell pkg-config --libs $(mod)))

CXXFLAGS_WARNINGS = -pedantic -Wall -Wextra -Wformat -Weffc++
#CXXFLAGS_WARNINGS = -pedantic -Wextra -Wformat -Weffc++
CXXFLAGS_OPT = -O0 -g3

LIBS = $(LIBS_PKGCONFIG)
CXXFLAGS = $(CXXFLAGS_PKGCONFIG) $(CXXFLAGS_WARNINGS) $(CXXFLAGS_OPT)

all: $(BINS)

%.o: %.cxx
	$(CXX) -c -o $@ $(CXXFLAGS) $^

request: request.o config.o phase.o response.o settings.o str.o utils.o
	$(CXX) -o $@ $(LIBS) $(CIBS) $^

clean:
	-rm -f $(BINS)
	-rm -f $(OBJS)
	-rm -f *~
	-rm -f *.o
	
install:
	-mkdir -p /etc/seggetd
	-cp *.conf /etc/seggetd
	-cp request /usr/bin
	-mkdir -p /var/tmp/seggetd
	-mkdir -p /var/log/seggetd

.PRECIOUS: %.o