forked from lincity-ng/lincity-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jamrules
91 lines (77 loc) · 1.96 KB
/
Jamrules
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
83
84
85
86
87
88
89
90
if ! $(top_builddir)
{
top_builddir = $(TOP) ;
}
top_srcdir = $(TOP) ;
JAMCONFIG ?= $(top_builddir)/Jamconfig ;
include $(JAMCONFIG) ;
if ! $(JAMCONFIG_READ)
{
EXIT "Couldn't find config. Please run 'configure' first." ;
}
CXXFLAGS += -std=c++14 ;
if $(USE_STLPORT_DEBUG)
{
CXXFLAGS += -I/usr/include/stlport ;
CXXFLAGS += -D_STLP_DEBUG=1 -D_STLP_DEBUG_UNINITIALIZED=1 ;
CXXFLAGS += -D_STLP_SHRED_BYTE=0xA3 ;
LIBS += -lstlport_gcc_debug ;
}
switch $(VARIANT) {
case optimize :
CFLAGS += -O3 -g -Wall ;
CXXFLAGS += -O3 -g -Wall ;
LIBS += -g ;
case debug :
CFLAGS += -Wall -W -O0 -g3 -DDEBUG -Werror -Wformat=2 ;
CXXFLAGS += -Wall -W -O0 -g3 -DDEBUG -Werror -Wformat=2 ;
LIBS += -g3 ;
case profile :
CFLAGS += -O3 -g3 -pg ;
CXXFLAGS += -O3 -g3 -pg ;
LIBS += -g3 -pg ;
case experimental :
CFLAGS += -Wall -W -O0 -g3 -DDEBUG -DEXPERIMENTAL ;
CXXFLAGS += -Wall -W -O0 -g3 -DDEBUG -DEXPERIMENTAL ;
LIBS += -g3 ;
case * :
EXIT "Invalid variant $(VARIANT) selected" ;
}
LINK = $(CXX) ;
# Include build rules
include $(TOP)/mk/jam/build.jam ;
# Include Dirs
IncludeDir $(top_builddir) ; # for config.h
IncludeDir $(top_srcdir)/src ;
rule DoXmlGetText
{
local sources = [ SearchSource $(>) ] ;
local target = [ LocateTarget $(<) : $(SUBDIR) ] ;
XmlGetText $(target) : $(sources) ;
Depends all : $(target) ;
Clean clean : $(target) ;
}
rule XmlGetText
{
Depends $(<) : $(>) $(XMLGETTEXT) ;
}
actions XmlGetText
{
$(LOCATE_TARGETS)/$(XMLGETTEXT) $(XMLGETTEXT_FLAGS) $(<) $(>)
}
rule DoXGetText
{
local sources = [ SearchSource $(>) ] ;
local target = [ LocateTarget $(<) : $(SUBDIR) ] ;
XGetText $(target) : $(sources) ;
Depends all : $(target) ;
Clean clean : $(target) ;
}
rule XGetText
{
Depends $(<) : $(>) ;
}
actions XGetText
{
$(XGETTEXT) $(XGETTEXT_FLAGS) --keyword='_:1' --keyword='N_:1' -o $(<) $(>)
}