changes from H.G. Muller; version 4.3.16
[xboard.git] / winboard / cygwin.mak
1 #
2 # Makefile for WinBoard, using the GNU Cygwin toolset
3 #
4
5 # Uncomment both lines to turn on debugging symbols #######
6 cdebug= -g
7 linkdebug= -g
8 #######################################################
9
10 proj=winboard
11 allobj=  winboard.o backend.o parser.o moves.o lists.o \
12          gamelist.o pgntags.o wedittags.o wgamelist.o zippy.o \
13          wsockerr.o wbres.o wclipbrd.o woptions.o uci.o \
14          wengineo.o wevalgraph.o whistory.o wlayout.o \
15          wplugin.o wsnap.o book.o
16
17 dotc=   winboard.c backend.c parser.c moves.c lists.c \
18         gamelist.c pgntags.c wedittags.c wgamelist.c zippy.c \
19         wsockerr.c winboard.rc wclipbrd.c woptions.c uci.c \
20         wengineo.c wevalgraph.c whistory.c wlayout.c \
21         wplugin.c wsnap.c book.c
22
23 # Currently WinBoard will build either with or without -mno-cygwin
24 # however, a Cygwin bug in forming the command line to WinMain() is
25 # exposed if -mno-cygwin is not used.
26 cygwin= -mno-cygwin
27
28 VPATH= .:..
29 CFLAGS= $(cdebug)
30 INCLUDES= -I. -I..
31 CVARS= $(INCLUDES) $(cygwin)
32 CC = gcc $(CVARS)
33 WCC = $(CC) -mwindows $(linkdebug)
34 HC="/c/program files/help workshop/hcrtf.exe" -xn
35
36 all: $(proj).exe
37
38 depend: $(dotc)
39         makedepend -Y -f cygwin.mak $(INCLUDES) $^
40
41 clean:
42         rm -f *.obj *~ $(proj).exe $(proj).err $(proj).rbj \
43                 $(proj).RES $(proj).res $(proj).ini *.sbr *.bsc *.o \
44                 *.plg *.opt *.ncb *.debug *.bak *.gid *.GID
45
46 maintainer-clean: clean
47         rm -f parser.c *.hlp *.HLP
48
49 # Update the help file if necessary
50 #$(proj).hlp : $(proj).rtf
51 #       $(HC) $(proj).hpj
52 #       cat $(proj).err
53
54 # Update the resource if necessary
55 wbres.o: $(proj).rc $(proj).h resource.h
56         windres --use-temp-file --include-dir .. $< -O coff -o $@
57
58 # Update the object files if necessary
59
60 parser.c: parser.l
61         flex -oparser.c -L $<
62
63 $(proj).exe: $(allobj) $(proj).hlp $(proj).rc
64         $(WCC) $(guiflags) $(allobj) \
65         -lwsock32 -lwinmm \
66         -o $(proj).exe
67
68 # DO NOT DELETE
69
70 winboard.o: config.h ../common.h winboard.h resource.h ../frontend.h
71 winboard.o: ../backend.h ../lists.h ../moves.h wclipbrd.h wgamelist.h
72 winboard.o: wedittags.h woptions.h wsockerr.h defaults.h
73 backend.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h
74 backend.o: ../parser.h ../moves.h ../zippy.h ../backendz.h
75 parser.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h
76 parser.o: ../parser.h ../moves.h
77 moves.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h
78 moves.o: ../moves.h ../parser.h
79 lists.o: config.h ../common.h ../lists.h
80 gamelist.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h
81 gamelist.o: ../parser.h
82 pgntags.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h
83 pgntags.o: ../parser.h
84 wedittags.o: config.h ../common.h winboard.h resource.h ../frontend.h
85 wedittags.o: ../backend.h ../lists.h
86 wgamelist.o: config.h ../common.h winboard.h resource.h ../frontend.h
87 wgamelist.o: ../backend.h ../lists.h
88 zippy.o: config.h ../common.h ../zippy.h ../frontend.h ../backend.h
89 zippy.o: ../lists.h ../backendz.h
90 wsockerr.o: wsockerr.h
91 winboard.o: resource.h
92 wclipbrd.o: config.h ../common.h winboard.h resource.h ../frontend.h
93 wclipbrd.o: ../backend.h ../lists.h wclipbrd.h
94 woptions.o: config.h ../common.h winboard.h resource.h ../backend.h
95 woptions.o: ../lists.h ../frontend.h woptions.h defaults.h wedittags.h
96 book.o: ../common.h ../backend.h