2 # Makefile for WinBoard, using Microsoft Visual C++ and nmake
3 # Command line: nmake /f msvc.mak
10 !include <$(OS)$(ENV).MAK>
12 # Use up to date help compiler
15 # Comment out both to turn on debugging symbols #######
18 #######################################################
21 allobj = winboard.obj backend.obj parser.obj moves.obj lists.obj \
22 gamelist.obj pgntags.obj wedittags.obj wgamelist.obj zippy.obj \
23 wsockerr.obj wclipbrd.obj woptions.obj
25 cvars = $(cvars) -I. -I.. -DWINVER=0x0400
26 #cflags = $(cflags) /FR
32 del /f *.obj *~ $(proj).exe $(proj).err $(proj).rbj $(proj).res \
33 $(proj).ini *.sbr *.bsc *.o *.plg *.opt *.ncb *.debug *.bak *.gid
35 # Update the help file if necessary
36 $(proj).hlp : $(proj).rtf
40 # Update the resource if necessary
41 $(proj).rbj: $(proj).rc $(proj).h $(proj).res resource.h
42 $(rc) $(rcvars) -r -fo $(proj).res $(proj).rc
43 cvtres /machine:X86 /out:$(proj).rbj $(proj).res
45 # Update the object files if necessary
46 winboard.obj: winboard.c config.h winboard.h ../common.h ../frontend.h \
47 ../backend.h ../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \
48 wedittags.h wsockerr.h ../lists.h
49 $(cc) $(cflags) $(cvars) $(cdebug) winboard.c
51 backend.obj: ../backend.c config.h ../common.h ../frontend.h ../backend.h \
52 ../parser.h ../moves.h ../zippy.h ../backendz.h ../lists.h
53 $(cc) $(cflags) $(cvars) $(cdebug) ../backend.c
55 parser.obj: parser.c config.h ../common.h ../backend.h ../parser.h \
56 ../frontend.h ../moves.h ../lists.h
57 $(cc) $(cflags) $(cvars) $(cdebug) parser.c
60 flex -oparser.c -L ../parser.l
62 moves.obj: ../moves.c config.h ../backend.h ../common.h ../parser.h \
63 ../moves.h ../lists.h ../frontend.h
64 $(cc) $(cflags) $(cvars) $(cdebug) ../moves.c
66 lists.obj: ../lists.c config.h ../lists.h ../common.h
67 $(cc) $(cflags) $(cvars) $(cdebug) ../lists.c
69 gamelist.obj: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \
70 ../backend.h ../parser.h ../lists.h
71 $(cc) $(cflags) $(cvars) $(cdebug) ../gamelist.c
73 pgntags.obj: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \
74 ../parser.h ../lists.h
75 $(cc) $(cflags) $(cvars) $(cdebug) ../pgntags.c
77 wclipbrd.obj: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \
78 winboard.h wclipbrd.h ../lists.h resource.h
79 $(cc) $(cflags) $(cvars) $(cdebug) wclipbrd.c
81 wedittags.obj: wedittags.c config.h ../common.h winboard.h ../frontend.h \
82 ../backend.h ../lists.h resource.h
83 $(cc) $(cflags) $(cvars) $(cdebug) wedittags.c
85 wgamelist.obj: wgamelist.c config.h. ../common.h winboard.h ../frontend.h \
86 ../backend.h wgamelist.h ../lists.h resource.h
87 $(cc) $(cflags) $(cvars) $(cdebug) wgamelist.c
89 woptions.obj: woptions.c config.h ../common.h ../frontend.h ../backend.h \
91 $(cc) $(cflags) $(cvars) $(cdebug) woptions.c
93 wsockerr.obj: wsockerr.c wsockerr.h
94 $(cc) $(cflags) $(cvars) $(cdebug) wsockerr.c
96 zippy.obj: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \
97 ../backend.h ../backendz.h ../lists.h
98 $(cc) $(cflags) $(cvars) $(cdebug) ../zippy.c
100 $(proj).exe: $(allobj) $(proj).rbj $(proj).hlp $(proj).rc
101 $(link) $(linkdebug) /NODEFAULTLIB:LIBCD $(guiflags) $(allobj) \
102 wsock32.lib comctl32.lib winmm.lib libc.lib oldnames.lib kernel32.lib \
103 advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib \
105 $(proj).rbj -out:$(proj).exe
107 # I don't use the .sbr, but it can be reenabled. Also turn /FR back on above.
111 $(cc) $(cflags) $(cvars) $(cdebug) test.c
112 $(link) $(linkdebug) $(conflags) test.obj $(conlibs) -out:test.exe