~netrek-developers/netrek-client-cow/trunk

« back to all changes in this revision

Viewing changes to _darcs/pristine/mkfilent.mak

  • Committer: Collin Pruitt
  • Date: 2009-05-12 04:30:09 UTC
  • Revision ID: collinp111@gmail.com-20090512043009-3jsjojoyrk16oass
Initial upload - updated from http://james.tooraweenah.com/darcs/netrek-client-cow/ using darcs (hince the existnace of _darcs), fully patched.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
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
 
7
#
 
8
# !IFNDEF's added for MSVC - Microsoft Visual C++
 
9
 
 
10
# For No Debugging Info invoke with   make nodebug=1
 
11
#
 
12
# Note: creating the environment variable NODEBUG is an
 
13
#       alternate method to setting this option via the make command 
 
14
line.
 
15
 
 
16
# Change this when you compile!
 
17
CWHO = greynite@vnet.net
 
18
 
 
19
!IFNDEF MSVC
 
20
 
 
21
# Basic defs
 
22
cc     = wcc386
 
23
rc     = wrc
 
24
hc     = whc
 
25
link   = wlink
 
26
implib = wlib
 
27
compileandlink = wcl386
 
28
 
 
29
!ELSE
 
30
 
 
31
# Microsoft Visual C++ defs
 
32
# hc == help compiler?
 
33
cc     = cl
 
34
rc     = rc
 
35
hc     = hcw
 
36
link   = link
 
37
implib = lib
 
38
compileandlink = cl
 
39
 
 
40
!ENDIF
 
41
 
 
42
# Compile Flags - must be specified after $(cc)
 
43
#
 
44
# Compiler flags (all other defaults are OK for NT):
 
45
#   -d2      - generate debugging information
 
46
#   -bt=nt   - compile for NT
 
47
#   -c       - compile only
 
48
#   -od      - no optimization
 
49
#   -otexan  - full optimization for speed
 
50
#   -zq      - shut up, already (no banner message)
 
51
 
 
52
 
 
53
!IFNDEF MSVC
 
54
 
 
55
!IFDEF nodebug
 
56
cflags = -zq -otexan -zp4 -5 -fp3 -dWIN32
 
57
!ELSE
 
58
cflags = -zq -d2 -od -dWIN32 
 
59
!ENDIF
 
60
 
 
61
!ELSE
 
62
 
 
63
# MS Visual C++ (v4.0) options
 
64
# /nologo   - no banner
 
65
# /MT       - Multi-threaded app
 
66
# /Ox       - max optimization
 
67
# /Od       - disable optimizations
 
68
# /G4       - 486 optimized (386 running Win32? Uh, no)
 
69
# /c        - compile only
 
70
# /Zi       - debugging info
 
71
# /Fr[file] - generate browse info
 
72
 
 
73
!IFDEF nodebug
 
74
cflags = /nologo /MT -DWIN32 /Ox /G4
 
75
ccompileonly = /c
 
76
!ELSE
 
77
cflags = /nologo /MT -DWIN32 /Od /G4 /Zi
 
78
ccompileonly = /c
 
79
!ENDIF
 
80
 
 
81
!ENDIF
 
82
 
 
83
# resource compiler
 
84
rcvars = -DWIN32 
 
85
 
 
86
########################################
 
87
# Link flags
 
88
#
 
89
 
 
90
!IFNDEF MSVC
 
91
 
 
92
!IFDEF NODEBUG
 
93
ldebug = 
 
94
!ELSE
 
95
ldebug = d all 
 
96
!ENDIF
 
97
 
 
98
!ELSE
 
99
 
 
100
!IFDEF NODEBUG
 
101
ldebug = /INCREMENTAL:NO
 
102
!ELSE
 
103
ldebug = /INCREMENTAL:NO /DEBUG
 
104
!ENDIF
 
105
 
 
106
!ENDIF
 
107
########################################
 
108
 
 
109
# declarations common to all linker options
 
110
 
 
111
!IFNDEF MSVC
 
112
 
 
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
 
118
lout      = "name "
 
119
#GNU multi-byte precision library - for RSA
 
120
GMPLIB = .\addon\lib\libgmp.lib
 
121
 
 
122
!ELSE
 
123
 
 
124
lflags = /STACK:8192
 
125
#Dunno here...
 
126
conlflags = $(lflags) /NODEFAULTLIB /SUBSYSTEM:CONSOLE
 
127
guilflags = $(lflags) /SUBSYSTEM:CONSOLE
 
128
lout      = "/OUT:"
 
129
GMPLIB = libmp.lib libgmp.lib libcmt.lib user32.lib gdi32.lib\
 
130
         wsock32.lib kernel32.lib winmm.lib mpr.lib
 
131
 
 
132
!ENDIF
 
133
 
 
134
 
 
135
 
136
---------------------------------------------------------------------------
 
137
# - Start of makefile proper
 
138
 
 
139
INCS = -I.\win32\h
 
140
ARCH = Intel/Win32
 
141
 
 
142
# DEFS  = -DRSA  -DDEBUG
 
143
DEFS = -DRSA -DDEBUG
 
144
 
 
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 
 
155
 
 
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
 
166
 
 
167
INPUTOBJ        = input.obj redraw.obj 
 
168
MAINOBJ         = main.obj
 
169
MAINSRC         = main.c
 
170
 
 
171
RSASRC = 
 
172
RSAOBJ = 
 
173
 
 
174
WIN32_SRCS = winmain.c mswindow.c winsndlib.c
 
175
WIN32_OBJS = winmain.obj mswindow.obj winsndlib.obj
 
176
 
 
177
RANDOMOBJ = random.obj
 
178
 
 
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
 
182
 
 
183
all: netrek.exe
 
184
 
 
185
cflags.c: mkcflags.exe config.h mkfilent.mak
 
186
                mkcflags "$(cc) $(cflags)" "$(ARCH)"  > cflags.c
 
187
                echo char cwho[]="$(CWHO)"; >> cflags.c
 
188
 
 
189
mkcflags.exe: mkcflags.c patchlevel.h version.h config.h mkfilent.mak
 
190
                $(compileandlink) $(cflags) $(DEFS) $(INCS) mkcflags.c 
 
191
 
 
192
 
 
193
OBJS = $(ROBJ) $(MAINOBJ) $(RSAOBJ) $(INPUTOBJ) $(WIN32_OBJS) 
 
194
$(RANDOMOBJ)
 
195
 
 
196
.c.obj:
 
197
        $(cc) $(cflags) $(ccompileonly) $(cdebug) $(DEFS) $(INCS) $<
 
198
 
 
199
!IFNDEF MSVC
 
200
RESOURCES = netrek.rc
 
201
!ELSE
 
202
RESOURCES = netrek.res
 
203
$(RESOURCES): netrek.rc
 
204
        rc netrek.rc
 
205
!ENDIF
 
206
 
 
207
netrek.mif: mkfilent.mak
 
208
                @echo $(conlflags) $(ldebug) $(lout)netrek.exe > $@
 
209
!IFDEF MSVC
 
210
                @echo netrek.res >> $@
 
211
!ENDIF
 
212
                @echo $(GMPLIB) >> $@
 
213
                for %i in ($(OBJS)) do echo %i >> $@
 
214
 
 
215
netrek.exe:  $(OBJS) $(RESOURCES) warn.cur trek.cur main.ico 
 
216
netrek.mif
 
217
                $(link) @netrek.mif
 
218
                copy netrek.exe c:\games\netrek
 
219
!IFNDEF MSVC
 
220
        $(rc) netrek.rc netrek.exe
 
221
!ENDIF