-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTuprules.tup
51 lines (39 loc) · 904 Bytes
/
Tuprules.tup
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
.gitignore
ifdef CXX
CXX = @(CXX)
else
CXX = clang++
endif
ifdef CC
CC = @(CC)
else
CC = clang
endif
ifdef LD
LD = @(LD)
else
LD = $(CXX)
endif
ifdef AR
AR = @(AR)
else
AR = ar rcs
endif
ifdef PKG_CONFIG
PKG_CONFIG = @(PKG_CONFIG)
else
PKG_CONFIG = pkg-config
endif
TOP = $(TUP_CWD)
CCFLAGS = -g -Wall -Wextra -pedantic -Wimplicit-fallthrough -fPIC \
-I$(TOP)/src `pkg-config --cflags lua` @(CCFLAGS)
CXXFLAGS = -std=c++11 @(CXXFLAGS)
ifeq ($(CXX),clang++)
CXXFLAGS += -fcolor-diagnostics
endif
CFLAGS = -std=c99 @(CFLAGS)
LDFLAGS = -g -pthread -luv -lyaml-cpp `pkg-config --libs lua` -lhttp_parser -lsqlite3 -lmbedtls @(LDFLAGS)
!cxx = |> ^o C++ %f^ $(CXX) $(CXXFLAGS) $(CCFLAGS) -c %f -o %o |> %B.o | $(TOP)/<objs>
!cc = |> ^o C %f^ $(CC) $(CFLAGS) $(CCFLAGS) -c %f -o %o |> %B.o | $(TOP)/<objs>
!ar = |> ^o AR %o^ $(AR) %o %f |>
!ld = |> ^o LINK %o^ $(LD) %f $(LDFLAGS) -o %o |>