2
# =========================================================================
3
# COW on Win32 Makefile
4
# This makefile is written for Watcom C++ 10.0, but it should
5
# be fairly easy to convert to other compilers, mostly by changing
6
# this top section of the makefile, and the link line, below
8
# !IFNDEF's added for MSVC - Microsoft Visual C++
10
# For No Debugging Info invoke with make nodebug=1
12
# Note: creating the environment variable NODEBUG is an
13
# alternate method to setting this option via the make command
16
# Change this when you compile!
17
CWHO = greynite@vnet.net
27
compileandlink = wcl386
31
# Microsoft Visual C++ defs
32
# hc == help compiler?
42
# Compile Flags - must be specified after $(cc)
44
# Compiler flags (all other defaults are OK for NT):
45
# -d2 - generate debugging information
46
# -bt=nt - compile for NT
48
# -od - no optimization
49
# -otexan - full optimization for speed
50
# -zq - shut up, already (no banner message)
56
cflags = -zq -otexan -zp4 -5 -fp3 -dWIN32
58
cflags = -zq -d2 -od -dWIN32
63
# MS Visual C++ (v4.0) options
65
# /MT - Multi-threaded app
66
# /Ox - max optimization
67
# /Od - disable optimizations
68
# /G4 - 486 optimized (386 running Win32? Uh, no)
70
# /Zi - debugging info
71
# /Fr[file] - generate browse info
74
cflags = /nologo /MT -DWIN32 /Ox /G4
77
cflags = /nologo /MT -DWIN32 /Od /G4 /Zi
86
########################################
101
ldebug = /INCREMENTAL:NO
103
ldebug = /INCREMENTAL:NO /DEBUG
107
########################################
109
# declarations common to all linker options
113
lflags = op st=8192 op symf
114
# subsystem dependant flags
115
conlflags = $(lflags) SYS nt
116
guilflags = $(lflags) SYS nt_win
117
# The space is neccesary!!! -SAC
119
#GNU multi-byte precision library - for RSA
120
GMPLIB = .\addon\lib\libgmp.lib
126
conlflags = $(lflags) /NODEFAULTLIB /SUBSYSTEM:CONSOLE
127
guilflags = $(lflags) /SUBSYSTEM:CONSOLE
129
GMPLIB = libmp.lib libgmp.lib libcmt.lib user32.lib gdi32.lib\
130
wsock32.lib kernel32.lib winmm.lib mpr.lib
136
---------------------------------------------------------------------------
137
# - Start of makefile proper
142
# DEFS = -DRSA -DDEBUG
145
ROBJ = check.obj colors.obj data.obj death.obj defaults.obj dmessage.obj\
146
enter.obj findslot.obj getname.obj getship.obj helpwin.obj inform.obj\
147
interface.obj newwin.obj option.obj planetlist.obj macrowin.obj\
148
map.obj playerlist.obj ranklist.obj reserved.obj sintab.obj\
149
smessage.obj socket.obj stats.obj util.obj war.obj warning.obj\
150
udpopt.obj ping.obj pingstats.obj rotate.obj lagmeter.obj parsemeta.obj\
151
netstat.obj netstatopt.obj spopt.obj dashboard.obj dashboard3.obj\
152
short.obj distress.obj senddist.obj defwin.obj tools.obj sound.obj\
153
docwin.obj cflags.obj beeplite.obj feature.obj\
154
string_util.obj local.obj censor.obj cowmain.obj
156
RSRC = check.c colors.c data.c death.c defaults.c dmessage.c\
157
enter.c findslot.c getname.c getship.c helpwin.c inform.c\
158
input.c interface.c newwin.c option.c planetlist.c\
159
macrowin.c map.c playerlist.c ranklist.c redraw.c\
160
smessage.c parsemeta.c socket.c stats.c util.c war.c\
161
warning.c udpopt.c sintab.c ping.c pingstats.c rotate.c\
162
lagmeter.c netstat.c netstatopt.c spopt.c dashboard.c dashboard3.c\
163
short.c distress.c senddist.c defwin.c tools.c sound.c\
164
docwin.c cflags.c beeplite.c feature.c reserved.c\
165
string_util.c local.c censor.c cowmain.c
167
INPUTOBJ = input.obj redraw.obj
174
WIN32_SRCS = winmain.c mswindow.c winsndlib.c
175
WIN32_OBJS = winmain.obj mswindow.obj winsndlib.obj
177
RANDOMOBJ = random.obj
179
INCLUDES = struct.h packets.h defs.h copyright.h bitmaps.h data.h\
180
oldbitmaps.h tngbitmaps.h hullbitmaps.h rabbitbitmaps.h\
181
sound.h audio.h litebitmaps.h
185
cflags.c: mkcflags.exe config.h mkfilent.mak
186
mkcflags "$(cc) $(cflags)" "$(ARCH)" > cflags.c
187
echo char cwho[]="$(CWHO)"; >> cflags.c
189
mkcflags.exe: mkcflags.c patchlevel.h version.h config.h mkfilent.mak
190
$(compileandlink) $(cflags) $(DEFS) $(INCS) mkcflags.c
193
OBJS = $(ROBJ) $(MAINOBJ) $(RSAOBJ) $(INPUTOBJ) $(WIN32_OBJS)
197
$(cc) $(cflags) $(ccompileonly) $(cdebug) $(DEFS) $(INCS) $<
200
RESOURCES = netrek.rc
202
RESOURCES = netrek.res
203
$(RESOURCES): netrek.rc
207
netrek.mif: mkfilent.mak
208
@echo $(conlflags) $(ldebug) $(lout)netrek.exe > $@
210
@echo netrek.res >> $@
212
@echo $(GMPLIB) >> $@
213
for %i in ($(OBJS)) do echo %i >> $@
215
netrek.exe: $(OBJS) $(RESOURCES) warn.cur trek.cur main.ico
218
copy netrek.exe c:\games\netrek
220
$(rc) netrek.rc netrek.exe