forked from sixtyeight/kassomat-payout
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
82 lines (61 loc) · 1.97 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- mode: Makefile; -*-
# -----------------------------------------
# project itlssptest
CFLAGS_C = $(filter-out -include "sdk.h",$(CFLAGS))
# -----------------------------------------
# MAKE_DEP = -MMD -MT $@ -MF $(@:.o=.d)
CFLAGS = -std=c11 -Wall -g -O0
INCLUDES =
LDFLAGS =
RCFLAGS =
\LDLIBS = $(T_LDLIBS) -lstdc++ -lpthread
LDLIBS = $(T_LDLIBS) -lpthread -lhiredis -levent -luuid -ljansson
LINK_exe = gcc -o $@ $^ $(LDFLAGS) $(LDLIBS)
LINK_con = gcc -o $@ $^ $(LDFLAGS) $(LDLIBS)
LINK_dll = gcc -o $@ $^ $(LDFLAGS) $(LDLIBS) -shared
LINK_lib = rm -f $@ && ar rcs $@ $^
COMPILE_c = gcc $(CFLAGS_C) -o $@ -c $< $(MAKEDEP) $(INCLUDES)
COMPILE_cpp = g++ $(CFLAGS) -o $@ -c $< $(MAKEDEP) $(INCLUDES)
COMPILE_rc = windres $(RCFLAGS) -J rc -O coff -i $< -o $@ -I$(dir $<)
%.o : %.c ; $(COMPILE_c)
%.o : %.cpp ; $(COMPILE_cpp)
%.o : %.cxx ; $(COMPILE_cpp)
%.o : %.rc ; $(COMPILE_rc)
.SUFFIXES: .o .d .c .cpp .cxx .rc
all: all.before all.targets all.after
all.before :
$(MAKE) -C libitlssp
all.after : $(FIRST_TARGET)
all.targets : Release_target
doxygen :
rm -rf html/*
doxygen
clean :
$(MAKE) -C libitlssp clean
rm -rf html/*
rm -fv $(clean.OBJ)
rm -fv $(DEP_FILES)
.PHONY: all clean distclean
# -----------------------------------------
# Release_target
Release_target.BIN = payoutd
Release_target.OBJ = payoutd.o libitlssp/linux.o
DEP_FILES += payoutd.d
clean.OBJ += $(Release_target.BIN) $(Release_target.OBJ)
Release_target : Release_target.before $(Release_target.BIN) Release_target.after_always
Release_target : CFLAGS += -pedantic -pedantic-errors -g -O0
Release_target : INCLUDES +=
Release_target : RCFLAGS +=
Release_target : LDFLAGS +=
Release_target : T_LDLIBS = ./libitlssp/bin/libitlssp.a
ifdef LMAKE
Release_target : CFLAGS -= -g -pipe
endif
Release_target.before :
Release_target.after_always : $(Release_target.BIN)
$(Release_target.BIN) : $(Release_target.OBJ)
$(LINK_con)
# -----------------------------------------
ifdef MAKE_DEP
-include $(DEP_FILES)
endif