home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-02-22 | 6.8 KB | 239 lines |
- #
- # C source for GNU CHESS
- #
- # Revision: 1990-12-26
- #
- # Modified by Daryl Baker for use in MS WINDOWS environment
- #
- # This file is part of CHESS.
- #
- # CHESS is distributed in the hope that it will be useful, but WITHOUT ANY
- # WARRANTY. No author or distributor accepts responsibility to anyone for
- # the consequences of using it or for whether it serves any particular
- # purpose or works at all, unless he says so in writing. Refer to the CHESS
- # General Public License for full details.
- #
- # Everyone is granted permission to copy, modify and redistribute CHESS, but
- # only under the conditions described in the CHESS General Public License.
- # A copy of this license is supposed to have been given to you along with
- # CHESS so you can know your rights and responsibilities. It should be in a
- # file named COPYING. Among other things, the copyright notice and this
- # notice must be preserved on all copies.
- #
- #
- !include <ntwin32.mak>
-
- PROJ = chess
- PROJFILE = chess.mak
- VER = 321
-
- CC = cl
- #change the following line if optimizations are desired
- #CFLAGS = /W3 /Od /DWIN32 /D_WIN32 /nologo /Z7 /Zp
- CFLAGS = /W3 /Ox /DWIN32 /D_WIN32 /nologo /Zp
-
- LRF = echo > NUL
- LINKER = link
- LFLAGS = /BATCH /nologo /map
- LLIBS_R = /NOD:SLIBCE SLIBCEW
- LLIBS_G = LIBC.LIB
- MAPFILE_R = chess.map
-
- ASM = pas
- AFLAGS_G = /Mx /T
-
- RC = rc
- IMPLIB = implib
-
- DEF_FILE = CHESS.DEF
- OBJS = CHESS.obj INIT.obj BOARD.obj ABOUT.obj PIECE.obj \
- HITTEST.obj COLOR.obj TIMECNT.obj SEARCH.obj INITIALI.obj \
- EVAL.obj GLOBALS.obj DSP.obj MSWDSP.obj BOOK.obj CREATE.obj \
- SAVEOPEN.obj NUMDLG.obj INITMENU.obj REVIEW.obj STATS.obj \
- TEST.obj PROMOTE.obj MANUAL.obj
-
- RT_OBJS = VERSION.obj
-
- RESS = chess.res
-
- BMPS = king.bmp kingm.bmp kingo.bmp pawn.bmp pawno.bmp pawnm.bmp \
- rook.bmp rooko.bmp rookm.bmp knight.bmp knightm.bmp knighto.bmp \
- bishop.bmp bishopm.bmp bishopo.bmp queen.bmp queenm.bmp queeno.bmp
-
- HELPFILES = chess.rtf article.rtf article2.rtf copying.rtf move-gen.rtf heuristi.rtf match.rtf
- HELPSOURCE = chess.doc article.doc article2.doc copying.doc move-gen.doc heuristi.doc match.doc
-
- all: $(PROJ).exe $(PROJ).hlp
-
- .SILIENT:
-
- .SUFFIXES: .rc .res .c .obj .doc .rtf
-
- CHESS.RES : chess32.rc $(BMPS) color.dlg chess.ico timecnt.dlg saveopen.dlg \
- getnum.dlg review.dlg about.dlg stats.dlg test.dlg promote.dlg \
- manual.dlg
- rc chess32.rc
-
- ABOUT.obj : ABOUT.C
- $(CC) /c $(CFLAGS) $*.c
-
- CHESS.obj : CHESS.C gnuchess.h defs.h chess.h saveopen.h color.h
- $(CC) /c $(CFLAGS) $*.c
-
- COLOR.obj : COLOR.C chess.h color.h
- $(CC) /c $(CFLAGS) $*.c
-
- MANUAL.obj : MANUAL.C chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- NUMDLG.obj : NUMDLG.C chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- PROMOTE.obj : PROMOTE.C chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- REVIEW.obj : REVIEW.C gnuchess.h chess.h defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- SAVEOPEN.obj : SAVEOPEN.C saveopen.h
- $(CC) /c $(CFLAGS) $*.c
-
- STATS.obj : STATS.C gnuchess.h stats.h
- $(CC) /c $(CFLAGS) $*.c
-
- TEST.obj : TEST.C gnuchess.h chess.h defs.h
- $(CC) /c $(CFLAGS) /Od $*.c
-
- TIMECNT.obj : TIMECNT.C timecnt.h chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- BOARD.obj : BOARD.C defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- BOOK.obj : BOOK.C gnuchess.h defs.h chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- CREATE.obj : CREATE.C defs.h chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- DSP.obj : DSP.C gnuchess.h defs.h chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- EVAL.obj : EVAL.C gnuchess.h defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- GLOBALS.obj : GLOBALS.C gnuchess.h
- $(CC) /c $(CFLAGS) $*.c
-
- HITTEST.obj : HITTEST.C defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- INIT.obj : INIT.C
- $(CC) /c $(CFLAGS) $*.c
-
- INITIALI.obj : INITIALI.C gnuchess.h defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- INITMENU.obj : INITMENU.C gnuchess.h chess.h
- $(CC) /c $(CFLAGS) $*.c
-
- MSWDSP.obj : MSWDSP.C gnuchess.h chess.h defs.h stats.h
- $(CC) /c $(CFLAGS) $*.c
-
- PIECE.obj : PIECE.C chess.h defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- SEARCH.obj : SEARCH.C gnuchess.h defs.h
- $(CC) /c $(CFLAGS) $*.c
-
- #
- # Code to generate new time stamp when any module updated
- #
- #makever.exe: makever.c
- # cc /nologo makever.c
- #
-
- VERSION.obj: VERSION.c
- $(CC) /c $(CFLAGS) $*.c
-
- #VERSION.c: $(OBJS) $(RESS) $(BMPS) makever.exe
- # makever >version.c
-
- # Create the help file
-
- chess.hlp: chess.hpj $(HELPFILES)
- # hc chess.hpj
-
- chexe$(VER).zip:
- distexe: chess.exe readme.txt gnuchess.boo chess.hlp copying
- -del chexe$(VER).zip
- pkzip -a chexe$(VER) readme.txt chess.exe gnuchess.boo chess.hlp copying
-
- distsrc: chess.exe chexe$(VER).zip readme.txt chess.mak chess.hlp
- -del chess$(VER).zip
- pkzip -a chess$(VER) @files.lst
-
- # pkzip -a chess$(VER) readme.txt $(PROJ).exe *.boo $(PROJ).hlp files.lst
- # pkzip -a chess$(VER) $(PROJ).def $(PROJ).rc *.dlg $(PROJ).mak $(PROJ).ico
- # pkzip -a chess$(VER) copying winport change.log todo *.h *.c *.bmp
- # pkzip -a chess$(VER) chess.hpj $(HELPFILES)
- # pkzip -a chess$(VER) $(HELPSOURCE)
-
- disttar: chess.exe chexe$(VER).zip readme.txt chess.mak chess.hlp
- -del ch$(VER)t.*
- -del chess.ta?
- tar -cf chess.tar -u bmp -u doc -u rtf -u hlp -u exe -T files.lst
- c:\ucs\compress chess.tar
- ren chess.taz ch$(VER)t.Z
-
- distmail: chess.exe chexe$(VER).zip readme.txt chess.mak chess.hlp
- -del ch$(VER)t.*
- -del chess.ta?
- tar -cf chess.tar -u bmp -u doc -u rtf -u hlp -u exe -T files.lst
- c:\ucs\compress chess.tar
- ren chess.taz ch$(VER)t.Z
- uuxfer20 -s61000 -m -o -ech$(VER)t.Z
-
- clean:
- -del *.obj
- -del *.bak
- -del *.res
- -del *.err
- -del *.ph
-
- #$(PROJ).exe : $(DEF_FILE) $(OBJS) $(RT_OBJS) $(RESS)
- # $(LRF) @<<$(PROJ).lrf
- #$(LFLAGS) $(RT_OBJS: = +^
- #) $(OBJS: = +^
- #)
- #$@
- #$(MAPFILE_R)
- #$(LLIBS_G: = +^
- #) +
- #$(LLIBS_R: = +^
- #) +
- #$(LIBS: = +^
- #)
- #$(DEF_FILE) ;
- #<<
-
- $(PROJ).exe : $(DEF_FILE) $(OBJS) $(RT_OBJS) $(RESS)
- # $(LINKER) $(OBJS) $(RT_OBJS) libc.lib comdlg32.lib user32.lib shell32.lib kernel32.lib gdi32.lib /out:$(PROJ).exe chess32.res /debug /debugtype:both
- $(LINKER) $(OBJS) $(RT_OBJS) libc.lib comdlg32.lib user32.lib shell32.lib kernel32.lib gdi32.lib /out:$(PROJ).exe chess32.res
-
- # $(RC) $(RESS) $@
-
- .c.obj :
- $(CC) /c $(CFLAGS) $<
-
- .rc.res :
- $(RC) /r $<
-
- #
- # this rule is here to trap changes to the doc files. Ideally it
- # would call a program todo RTF conversion.
- #
- .doc.rtf :
- @echo $< is out of date. Resave as RTF.
- @zzz### dummy command line need abort command
-