forked from OpenMeridian/Meridian59
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.mak
138 lines (112 loc) · 3.21 KB
/
common.mak
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# stuff included in blakston makefiles
# defining DYNAMIC uses multi-threaded C runtime DLL;
# otherwise link statically with single-threaded lib
# 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
!endif
!ifdef RELEASE
!undef DEBUG
OUTDIR=release
NODPRINTFS = 1
!else
DEBUG = 1
OUTDIR=debug
!endif
# set to get debugging info in executable
!ifdef NODEBUG
!undef 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
MYSQLINCLUDEDIR = $(TOPDIR)\include\mysql
DX9INCLUDEDIR = $(TOPDIR)\include\dx9
KODDIR = $(TOPDIR)\kod
KODINCLUDEDIR = $(KODDIR)\include
PALETTEFILE = $(TOPDIR)\blakston.pal
# compiler specs -- uses multi-threaded DLL C runtime library
# /TP builds C files in C++ mode
# /WX treats warnings as errors
# /GR- turns off RTTI
# /EHsc- turns off exceptions
CCOMMONFLAGS = -nologo -DBLAK_PLATFORM_WINDOWS -DWIN32 \
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE \
-D_WINSOCK_DEPRECATED_NO_WARNINGS /wd4996 /wd4390 \
-TP -WX -GR- -EHsc- /MP -W3 /fp:fast
CNORMALFLAGS = $(CCOMMONFLAGS) /Ox /GL /GF
CDEBUGFLAGS = $(CCOMMONFLAGS) -Zi -DBLAKDEBUG
CNODEBUGFLAGS = $(CCOMMONFLAGS) -DBLAKDEBUG
LINKNORMALFLAGS = -nologo /release /machine:ix86 /LTCG /LARGEADDRESSAWARE /OPT:REF /OPT:ICF
LINKDEBUGFLAGS = -nologo /debug /machine:ix86 /LARGEADDRESSAWARE
LINKNODEBUGFLAGS = -nologo /machine:ix86 /LARGEADDRESSAWARE
!ifdef DEBUG
!ifdef DEBUGINFO
CFLAGS = $(CDEBUGFLAGS)
LINKFLAGS = $(LINKDEBUGFLAGS)
!else
CFLAGS = $(CNODEBUGFLAGS)
LINKFLAGS = $(LINKNODEBUGFLAGS)
!endif DEBUGINFO
!else
CFLAGS = $(CNORMALFLAGS)
LINKFLAGS = $(LINKNORMALFLAGS)
!endif DEBUG
!ifdef DLL
LINKFLAGS = $(LINKFLAGS) /DLL
!endif
!ifdef DYNAMIC
CFLAGS = $(CFLAGS) /MD
!else
CFLAGS = $(CFLAGS) /MT
!endif DYNAMIC
!ifdef NODPRINTFS
CFLAGS = $(CFLAGS) -DNODPRINTFS
!endif NODPRINTFS
# programs
CC = cl
MAKE = nmake -nologo
LIBPRG = lib -nologo
LINK = link -nologo
RC = rc
RSCMERGE = $(TOPDIR)\bin\rscmerge.exe -o
POSTBUILD = $(TOPDIR)\postbuild.bat
LEX = $(TOPDIR)\bin\flex -I -i
YACC = $(TOPDIR)\bin\bison -d -t
XCP = xcopy /ydi
CP = copy /Y
RM = -del /Q
RMDIR = -rmdir
MV = move
LATEX = latex
MAKENSIS = "c:\program files (x86)\nsis\makensis.exe"
BC = $(BLAKBINDIR)\bc
MAKEBGF = $(BLAKBINDIR)\makebgf
# environment variables for compiler
LIB = $(LIB);$(BLAKLIBDIR)
INCLUDE = $(INCLUDE);$(BLAKINCLUDEDIR);$(MYSQLINCLUDEDIR);$(DX9INCLUDEDIR)