changes from H.G. Muller; version 4.3.15
[xboard.git] / winboard / cygwin.mak
index b5a3528..cb4781e 100644 (file)
@@ -1,11 +1,6 @@
-#OS=WIN98\r
-#ENV=WIN32\r
-#CPU=i386\r
-#!include <$(OS)$(ENV).MAK>\r
-\r
-# Use up to date help compiler\r
-#hc="c:\program files\help workshop\hcrtf.exe" -xn\r
-\r
+#\r
+# Makefile for WinBoard, using the GNU Cygwin toolset\r
+#\r
 \r
 # Uncomment both lines to turn on debugging symbols #######\r
 cdebug= -g\r
@@ -15,43 +10,88 @@ linkdebug= -g
 proj=winboard\r
 allobj=  winboard.o backend.o parser.o moves.o lists.o \\r
         gamelist.o pgntags.o wedittags.o wgamelist.o zippy.o \\r
-         wsockerr.o wbres.o wclipbrd.o woptions.o\r
+        wsockerr.o wbres.o wclipbrd.o woptions.o uci.o \\r
+        wengineo.o wevalgraph.o whistory.o wlayout.o \\r
+        wplugin.o wsnap.o book.o\r
 \r
+dotc=   winboard.c backend.c parser.c moves.c lists.c \\r
+       gamelist.c pgntags.c wedittags.c wgamelist.c zippy.c \\r
+       wsockerr.c winboard.rc wclipbrd.c woptions.c uci.c \\r
+       wengineo.c wevalgraph.c whistory.c wlayout.c \\r
+       wplugin.c wsnap.c book.c\r
 \r
-# 2 Dec 2001 - the mingw libraries that I have right now\r
-#  (not updated for a few months) have bugs in fileno and stat\r
-#  that prevent WinBoard from working.\r
-#cygwin= -mno-cygwin\r
+# Currently WinBoard will build either with or without -mno-cygwin\r
+# however, a Cygwin bug in forming the command line to WinMain() is\r
+# exposed if -mno-cygwin is not used.\r
+cygwin= -mno-cygwin\r
 \r
+VPATH= .:..\r
 CFLAGS= $(cdebug)\r
-CVARS= -I. -mwindows $(cygwin)\r
+INCLUDES= -I. -I..\r
+CVARS= $(INCLUDES) $(cygwin)\r
 CC = gcc $(CVARS)\r
-WCC = $(CC) -mwindows -Xlinker "-e" -Xlinker "_mainCRTStartup" \\r
-  $(linkdebug) $(cygwin)\r
-LD = ld\r
+WCC = $(CC) -mwindows $(linkdebug)\r
+HC="/c/program files/help workshop/hcrtf.exe" -xn\r
 \r
 all: $(proj).exe\r
 \r
+depend: $(dotc)\r
+       makedepend -Y -f cygwin.mak $(INCLUDES) $^\r
+\r
+clean:\r
+       rm -f *.obj *~ $(proj).exe $(proj).err $(proj).rbj \\r
+               $(proj).RES $(proj).res $(proj).ini *.sbr *.bsc *.o \\r
+               *.plg *.opt *.ncb *.debug *.bak *.gid *.GID\r
+\r
+maintainer-clean: clean\r
+       rm -f parser.c *.hlp *.HLP\r
+\r
 # Update the help file if necessary\r
-#      $(proj).hlp : $(proj).rtf\r
-#      $(hc) $(proj).hpj\r
+#$(proj).hlp : $(proj).rtf\r
+#      $(HC) $(proj).hpj\r
 #      cat $(proj).err\r
 \r
 # Update the resource if necessary\r
 wbres.o: $(proj).rc $(proj).h resource.h\r
-       windres --use-temp-file $< -O coff -o $@\r
+       windres --use-temp-file --include-dir .. $< -O coff -o $@\r
 \r
 # Update the object files if necessary\r
 \r
 parser.c: parser.l\r
-       flex -L parser.l\r
-       cp lex.yy.c parser.c\r
+       flex -oparser.c -L $<\r
 \r
-$(proj).exe: $(allobj) $(proj).hlp $(proj).rc\r
+#$(proj).exe: $(allobj) $(proj).hlp $(proj).rc\r
+$(proj).exe: $(allobj) $(proj).rc\r
        $(WCC) $(guiflags) $(allobj) \\r
-       -lwsock32 -lcomctl32 -lwinmm  -lkernel32 \\r
-       -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lwinspool \\r
+       -lwsock32 -lwinmm \\r
        -o $(proj).exe\r
 \r
-clean:\r
-       rm *.o parser.c\r
+# DO NOT DELETE\r
+\r
+winboard.o: config.h ../common.h winboard.h resource.h ../frontend.h\r
+winboard.o: ../backend.h ../lists.h ../moves.h wclipbrd.h wgamelist.h\r
+winboard.o: wedittags.h woptions.h wsockerr.h defaults.h\r
+backend.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h\r
+backend.o: ../parser.h ../moves.h ../zippy.h ../backendz.h\r
+parser.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h\r
+parser.o: ../parser.h ../moves.h\r
+moves.o: config.h ../common.h ../backend.h ../lists.h ../frontend.h\r
+moves.o: ../moves.h ../parser.h\r
+lists.o: config.h ../common.h ../lists.h\r
+gamelist.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h\r
+gamelist.o: ../parser.h\r
+pgntags.o: config.h ../common.h ../frontend.h ../backend.h ../lists.h\r
+pgntags.o: ../parser.h\r
+wedittags.o: config.h ../common.h winboard.h resource.h ../frontend.h\r
+wedittags.o: ../backend.h ../lists.h\r
+wgamelist.o: config.h ../common.h winboard.h resource.h ../frontend.h\r
+wgamelist.o: ../backend.h ../lists.h\r
+zippy.o: config.h ../common.h ../zippy.h ../frontend.h ../backend.h\r
+zippy.o: ../lists.h ../backendz.h\r
+wsockerr.o: wsockerr.h\r
+winboard.o: resource.h\r
+wclipbrd.o: config.h ../common.h winboard.h resource.h ../frontend.h\r
+wclipbrd.o: ../backend.h ../lists.h wclipbrd.h\r
+woptions.o: config.h ../common.h winboard.h resource.h ../backend.h\r
+woptions.o: ../lists.h ../frontend.h woptions.h defaults.h wedittags.h\r
+book.o: ../common.h ../backend.h
\ No newline at end of file