1 # WinBoard makefile using gcc
\r
7 OBJS=backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o\
\r
8 parser.o wbres.o wclipbrd.o wedittags.o wengineoutput.o wevalgraph.o\
\r
9 wgamelist.o whistory.o history.o winboard.o wlayout.o woptions.o wsnap.o\
\r
10 wsockerr.o help.o wsettings.o wchat.o engineoutput.o evalgraph.o
\r
13 # make compiling less spammy
\r
14 compile = @echo "$1"; $(CC) $(CFLAGS) $1
\r
25 # set this to 1 unless you don't mind linking with cygwin1.dll
\r
29 # set up for cygwin or not
\r
30 ifeq ($(USE_MINGW),1)
\r
31 CFCYG = -mno-cygwin -DUSE_I64
\r
32 LFCYG = -mno-cygwin -lmsvcrt
\r
36 FLEX = "flex.exe" # we need version 2.5.4 or later, cygwin's is 2.5.35
\r
37 # "c:/mingw/mingw32/bin/flex.exe"
\r
38 HC="C:/Program Files/Help Workshop/hcrtf" -xn
\r
39 DEFS = -D_WIN32_IE=0x0300 -DWIN32
\r
43 WARN = -Wall -Wno-char-subscripts -Wno-parentheses
\r
45 ifeq ($(USE_DEBUG),0)
\r
47 OPTS = -Os -frename-registers -funit-at-a-time -fstrict-aliasing -fstrength-reduce
\r
49 CFDEBUG = -D_DEBUG -DDEBUG -g
\r
51 CF = -c $(WARN) -pipe $(CFDEBUG) $(DEFS) -I. -I..
\r
52 CFLAGS = $(CF) $(ARCH) $(OPTS) $(CFCYG)
\r
53 LFLAGS = $(LFCYG) $(CFDEBUG) -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32
\r
59 rm -f *~ $(PROJ).exe $(PROJ).err $(PROJ).rbj $(PROJ).RES $(PROJ).res\
\r
60 *.sbr *.bsc *.o *.obj *.plg *.opt *.ncb *.debug *.bak *.gid *.GID\
\r
61 *.map *.pdb *.tmp $(PROJ).ini
\r
64 # Update the help file if necessary
\r
65 $(PROJ).hlp : $(PROJ).rtf
\r
66 $(HC) $(PROJ).hpj && @cat $(PROJ).err && @mv $(PROJ).hlp tmp.hlp && @mv tmp.hlp $(PROJ).hlp || true # these moves to get the case right
\r
69 # Update the resource if necessary
\r
70 wbres.o: $(PROJ).rc $(PROJ).h resource.h config.h
\r
71 windres $(DEFS) --use-temp-file --include-dir .. $< -O coff -o $@
\r
74 $(PROJ).exe: $(OBJS) $(PROJ).hlp
\r
75 $(CC) $(guiflags) $(OBJS) $(LFLAGS) -o $(PROJ).exe
\r
78 winboard.o: winboard.c config.h winboard.h ../common.h ../frontend.h ../backend.h \
\r
79 ../moves.h defaults.h resource.h wclipbrd.h \
\r
80 wsockerr.h woptions.h wsnap.h ../lists.h help.h ../args.h
\r
83 backend.o: ../backend.c config.h ../common.h ../frontend.h ../backend.h \
\r
84 ../parser.h ../moves.h ../zippy.h ../backendz.h ../gettext.h ../lists.h
\r
87 parser.o: ../parser.c config.h ../common.h ../backend.h ../parser.h \
\r
88 ../frontend.h ../moves.h ../lists.h
\r
91 moves.o: ../moves.c config.h ../backend.h ../common.h ../parser.h \
\r
92 ../moves.h ../lists.h
\r
95 lists.o: ../lists.c config.h ../lists.h ../common.h
\r
98 gamelist.o: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \
\r
99 ../backend.h ../parser.h
\r
100 $(call compile, $<)
\r
102 wclipbrd.o: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \
\r
103 winboard.h resource.h wclipbrd.h ../lists.h
\r
104 $(call compile, $<)
\r
106 wedittags.o: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \
\r
107 ../backend.h ../lists.h
\r
108 $(call compile, $<)
\r
110 wgamelist.o: wgamelist.c config.h ../common.h winboard.h resource.h ../frontend.h \
\r
111 ../backend.h ../lists.h
\r
112 $(call compile, $<)
\r
114 woptions.o: woptions.c config.h ../common.h ../frontend.h ../backend.h ../lists.h \
\r
115 defaults.h winboard.h resource.h
\r
116 $(call compile, $<)
\r
118 wengineoutput.o: wengineoutput.c ../engineoutput.h config.h ../common.h \
\r
119 ../frontend.h ../backend.h ../lists.h winboard.h resource.h wsnap.h
\r
120 $(call compile, $<)
\r
122 engineoutput.o: ../engineoutput.c ../engineoutput.h config.h ../common.h \
\r
123 ../frontend.h ../backend.h ../lists.h
\r
124 $(call compile, $<)
\r
126 whistory.o: whistory.c config.h ../common.h ../frontend.h ../backend.h \
\r
127 ../lists.h winboard.h resource.h wsnap.h
\r
128 $(call compile, $<)
\r
130 history.o: ../history.c config.h ../common.h ../frontend.h ../backend.h \
\r
132 $(call compile, $<)
\r
134 wevalgraph.o: wevalgraph.c ../evalgraph.h config.h ../common.h ../frontend.h \
\r
135 ../backend.h ../lists.h winboard.h resource.h wsnap.h
\r
136 $(call compile, $<)
\r
138 evalgraph.o: ../evalgraph.c ../evalgraph.h config.h ../common.h ../frontend.h \
\r
139 ../backend.h ../lists.h
\r
140 $(call compile, $<)
\r
142 wlayout.o: wlayout.c config.h ../common.h ../frontend.h winboard.h resource.h
\r
143 $(call compile, $<)
\r
145 wsockerr.o: wsockerr.c wsockerr.h
\r
146 $(call compile, $<)
\r
148 help.o: help.c help.h
\r
149 $(call compile, $<)
\r
151 wsnap.o: wsnap.c wsnap.h
\r
152 $(call compile, $<)
\r
154 pgntags.o: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \
\r
155 ../parser.h ../lists.h
\r
156 $(call compile, $<)
\r
158 zippy.o: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \
\r
159 ../backend.h ../backendz.h ../lists.h
\r
160 $(call compile, $<)
\r
162 book.o: ../book.c ../common.h ../backend.h ../lists.h
\r
163 $(call compile, $<)
\r
165 uci.o: ../uci.c ../common.h ../backend.h ../frontend.h ../lists.h
\r
166 $(call compile, $<)
\r
168 wsettings.o: wsettings.c ../common.h ../backend.h ../frontend.h ../lists.h
\r
169 $(call compile, $<)
\r
171 wchat.o: wchat.c winboard.h wsnap.h ../common.h ../backend.h ../frontend.h ../lists.h
\r
172 $(call compile, $<)
\r
175 $(call compile, $<)
\r