forked from Meridian59/Meridian59
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.mak.linux
108 lines (87 loc) · 2.11 KB
/
common.mak.linux
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# stuff included in blakston makefiles
# defining RELEASE compiles optimized
# defining NODEBUG omits debugging information
# defining FINAL implies release, and also removes debugging strings from client executable
ifdef FINAL
RELEASE = 1
NODPRINTFS = 1
endif
ifdef RELEASE
DEBUG=
OUTDIR=release
else
DEBUG = 1
OUTDIR=debug
endif
# set to get debugging info in executable
ifdef NODEBUG
undefine DEBUGINFO
else
DEBUGINFO = 1
endif
# Set source directories
# Subdirectories of components
BBGUNDIR = $(TOPDIR)/bbgun
CLIENTDIR = $(TOPDIR)/clientd3d
BLAKSERVDIR = $(TOPDIR)/blakserv
BLAKCOMPDIR = $(TOPDIR)/blakcomp
ROOMEDITDIR = $(TOPDIR)/roomedit
DOCDIR = $(TOPDIR)/doc
DECODIR = $(TOPDIR)/blakdeco
MAKEBGFDIR = $(TOPDIR)/makebgf
RESOURCEDIR = $(TOPDIR)/resource
DIFFDIR = $(TOPDIR)/blakdiff
MODULEDIR = $(TOPDIR)/module
CRUSHERDIR = $(TOPDIR)/crusher
UTILDIR = $(TOPDIR)/util
SPROCKETDIR = $(TOPDIR)/sprocket
CLUBDIR = $(TOPDIR)/club
KEYBINDDIR = $(TOPDIR)/keybind
WAVEMIXDIR = $(TOPDIR)/wavemix
BLAKBINDIR = $(TOPDIR)/bin
BLAKLIBDIR = $(TOPDIR)/lib
BLAKINCLUDEDIR = $(TOPDIR)/include
BLAKSERVRUNDIR = $(TOPDIR)/run/server
CLIENTRUNDIR = $(TOPDIR)/run/localclient
KODDIR = $(TOPDIR)/kod
KODINCLUDEDIR = $(KODDIR)/include
PALETTEFILE = $(TOPDIR)/blakston.pal
CCOMMONFLAGS = -Wno-unused-result -Werror -DBLAK_PLATFORM_LINUX --std=c++11
CNORMALFLAGS = $(CCOMMONFLAGS) -O3
CDEBUGFLAGS = $(CCOMMONFLAGS) -DBLAKDEBUG -g
CNODEBUGFLAGS = $(CCOMMONFLAGS) -DBLAKDEBUG
LINKNORMALFLAGS =
LINKDEBUGFLAGS =
LINKNODEBUGFLAGS =
ifdef DEBUG
ifdef DEBUGINFO
CFLAGS = $(CDEBUGFLAGS)
LINKFLAGS = $(LINKDEBUGFLAGS)
else
CFLAGS = $(CNODEBUGFLAGS)
LINKFLAGS = $(LINKNODEBUGFLAGS)
endif
else
CFLAGS = $(CNORMALFLAGS)
LINKFLAGS = $(LINKNORMALFLAGS)
endif
ifdef NODPRINTFS
CFLAGS = $(CFLAGS) -DNODPRINTFS
endif
# programs
CC = g++
MAKE = make
LIBPRG =
LINK = g++
LEX = /usr/bin/flex -I -i
YACC = /usr/bin/bison -d -t
CP = cp
RM = rm -f
RMDIR = rmdir
MV = mv
LATEX = latex
BC = $(BLAKBINDIR)/bc
MAKEBGF = $(BLAKBINDIR)/makebgf
# environment variables for compiler
LIB = $(LIB);$(BLAKLIBDIR)
INCLUDE = $(INCLUDE);$(BLAKINCLUDEDIR)