home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / game / think / chaos / dmakefile < prev    next >
Makefile  |  1994-01-07  |  5KB  |  189 lines

  1. #   Chaos:            The Chess HAppening Organisation System    V5.2
  2. #   Copyright (C)   1993    Jochen Wiedmann
  3. #
  4. #   This program is free software; you can redistribute it and/or modify
  5. #   it under the terms of the GNU General Public License as published by
  6. #   the Free Software Foundation; either version 2 of the License, or
  7. #   (at your option) any later version.
  8. #
  9. #   This program is distributed in the hope that it will be useful,
  10. #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. #   GNU General Public License for more details.
  13. #
  14. #   You should have received a copy of the GNU General Public License
  15. #   along with this program; if not, write to the Free Software
  16. #   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. #
  18. #   This is the Makefile (DMake 2.1)
  19. #
  20.  
  21. VERSION=5_2
  22.  
  23. REVISION=2
  24.  
  25.  
  26. #   No special CFLAGS, except full error-checking and debugging
  27. #   You might include one of the following:
  28. #    -DAMIGA       Create Amiga executable
  29. #    -DDEBUG       Watch NULL pointers in strlen, strcpy, printf, ...
  30. #    -DDEBUG_PAIRINGS  Trace the pairing groups using printf
  31. ALLCFLAGS=-c -Isrc -3.0
  32. #ALLCFLAGS=-s -d1 -c -Isrc -3.0
  33. #ALLCFLAGS=-s -d1 -c -Isrc -3.0 -DDEBUG
  34. #ALLCFLAGS=-s -d1 -c -Isrc -2.0
  35. CFLAGS=$(ALLCFLAGS) -Hsrc/Chaos.m=Chaos.h -proto \
  36.        -ITools:MUI/Developer/C/Include
  37.  
  38. #   No special LFLAGS, except debugging
  39. LFLAGS=-3.0 -lmui -lm -lc -LTools:MUI/Developer/C/DLib
  40. #LFLAGS= -s -d1 -3.0 -lmui -lm -lc -LTools:MUI/Developer/C/DLib
  41.  
  42.  
  43. #   The binaries we use
  44. CC=dcc
  45. LN=dcc
  46. CATCOMP=FlexCat
  47. CI=Ci
  48. CO=Co
  49. GTEX=GTeX
  50. TEX=TeX
  51. TEXINDEX=TexIndex
  52. RM=Delete quiet
  53. MAKEINFO=MakeInfo
  54. LHA=LhA
  55. CP=Copy
  56. MV=Rename
  57.  
  58. #
  59. #   You should not need to change anything below.
  60. #
  61.  
  62. #   Some variables containing the lists of files to process
  63.  
  64. #   Object-files which are created manually
  65. OBJ=src/main.o src/MainAmi.o src/Memory.o src/Project.o src/ProjectAmi.o \
  66.     src/Players.o src/PlayersAmi.o src/Pairings.o src/PairingsAmi.o \
  67.     src/Rounds.o src/RoundsAmi.o src/Out.o src/OutAmi.o src/OutDWZ.o \
  68.     src/ARexxAmi.o
  69.  
  70. #   Object-files which don't need Chaos.h
  71. AUTOOBJ=src/DWZtabs.o src/Chaos_Cat.o
  72.  
  73. #   Doc-files
  74. DOC=Chaos_deutsch.dvi Chaos_deutsch.guide Chaos_deutsch.doc \
  75.     Chaos_english.dvi Chaos_english.guide Chaos_english.doc
  76.  
  77. #   Supported ARexx scripts
  78. AREXX=ChaosWindowOn.rexx ChaosWindowOff.rexx LoadTournament.rexx \
  79.       SaveTournament.rexx PrintTable.rexx UpdateRatings.rexx
  80.  
  81. #   Files which RCS should look for
  82. RCSBIN=$(AREXX:*:rexx/%1) Chaos.info doc.info COPYING.info COPYING Install \
  83.        s/Chaos_Project.info s/Chaos_Menu \
  84.        Install.Deutsch.info Install.English.info \
  85.        $(DOC:*:doc/%1.info)
  86.  
  87. RCSSRC=$(OBJ:*.o:%1.c) src/DWZtabs.c src/Chaos.h src/Chaos.cd \
  88.        src/Deutsch.ct src/Chaos_deutsch.texinfo \
  89.        src/Chaos_english.texinfo
  90.  
  91. RCS=$(RCSBIN) $(RCSSRC)
  92.  
  93.  
  94. #   Distribution-files
  95. DISTBIN=Chaos.info Chaos/Chaos $(RCSBIN:*:Chaos/%1) $(DOC:*:Chaos/doc/%1) \
  96.     Chaos/Catalogs/Deutsch/Chaos.catalog Chaos/Readme.mui \
  97.     Chaos/Readme.mui.info
  98. DISTSRC=$(RCSSRC:*:Chaos/%1) Chaos/src/NewCatalog.ct \
  99.     Chaos/src/Chaos_Cat.c Chaos/src/Chaos_Cat.h Chaos/DMakefile
  100.  
  101.  
  102.  
  103. #   Main targets: all clean dist doc ci
  104. all: Chaos doc Catalogs/Deutsch/Chaos.catalog
  105.  
  106. clean: binclean
  107.     $(RM) $(DOC:*:doc/%1) src/#?.aux src/#?.cp src/#?.ky src/#?.log \
  108.       src/#?.pg src/#?.toc src/#?.tp src/#?.vr src/#?.cps \
  109.       src/Chaos_Cat.?
  110.  
  111. binclean:
  112.     $(RM) src/#?.o src/#?.sym src/#?.dbg src/#?.m
  113.  
  114. dist: all
  115.     cd /
  116.     $(RM) chaos$(VERSION).lha
  117.     $(LHA) u -x chaos$(VERSION)bin.lha $(DISTBIN)
  118.     $(LHA) u -x chaos$(VERSION)src.lha $(DISTSRC)
  119.     cd chaos
  120.  
  121. doc:    $(DOC:*:doc/%1)
  122.  
  123. ci:
  124.     $(CP) DMakefile src/DMakefile
  125.     $(CI) -l$(REVISION) $(RCS) src/DMakefile
  126.     $(RM) src/DMakefile
  127.  
  128. co:
  129.     $(CO) -l$(REVISION) $(RCSEXT)
  130.     $(MV) Install_e.in Install.English.info
  131.  
  132.  
  133. freeze:
  134.     rcs -nV$(FREEZEVERSION): $(RCSEXT)
  135.  
  136.  
  137. #   doc-Rules
  138. $(DOC:*.guide:doc/%1.guide): $(DOC:*.guide:src/%1.texinfo)
  139.     $(MAKEINFO) --amiga-39 --fill-column 76 --output %(left) %(right)
  140.  
  141. $(DOC:*.doc:doc/%1.doc): $(DOC:*.doc:src/%1.texinfo)
  142.     $(MAKEINFO) --amiga-39 --fill-column 76 --no-headers --output %(left) \
  143.         %(right)
  144.  
  145. doc/Chaos_deutsch.dvi: src/Chaos_deutsch.texinfo
  146.     cd src
  147.     $(GTEX) %(right:src/*:%1)
  148.     $(TEXINDEX) %(right:src/*.texinfo:%1.cp)
  149.     $(GTEX) %(right:src/*:%1)
  150.     cd /
  151.     $(CP) %(right:*.texinfo:%1.dvi) %(left)
  152.     $(RM) %(right:*.texinfo:%1.dvi) src/#?.(fn|cp|vr|tp|ky|pg|aux|log|toc)(|s)
  153.  
  154. doc/Chaos_english.dvi: src/Chaos_english.texinfo
  155.     cd src
  156.     $(TEX) %(right:src/*:%1)
  157.     $(TEXINDEX) %(right:src/*.texinfo:%1.cp)
  158.     $(TEX) %(right:src/*:%1)
  159.     cd /
  160.     $(CP) %(right:*.texinfo:%1.dvi) %(left)
  161.     $(RM) %(right:*.texinfo:%1.dvi) src/#?.(fn|cp|vr|tp|ky|pg|aux|log|toc)(|s)
  162.  
  163.  
  164. #   source-Rules
  165. Chaos: $(OBJ) $(AUTOOBJ)
  166.     $(LN) $(LFLAGS) -o Chaos %(right:*.o)
  167.  
  168. $(OBJ): $(OBJ:*.o:%1.c)
  169.     $(CC) $(CFLAGS) -o %(left) %(right)
  170.  
  171. $(AUTOOBJ): $(AUTOOBJ:*.o:%1.c)
  172.     $(CC) $(ALLCFLAGS) -o %(left) %(right)
  173.  
  174. $(OBJ): src/Chaos.m
  175.  
  176. src/Chaos.m: src/Chaos.h src/Chaos_Cat.c
  177.     rm %(left)
  178.  
  179. src/Chaos_Cat.c: src/Chaos.cd
  180.     $(CATCOMP) %(right) %(left)=src/C_c_V20.sd NEWCTFILE src/NewCatalog.ct
  181.  
  182. src/Chaos_Cat.c: src/Chaos_Cat.h
  183.  
  184. src/Chaos_Cat.h: src/Chaos.cd
  185.     $(CATCOMP) %(right) %(left)=src/C_h.sd
  186.  
  187. Catalogs/Deutsch/Chaos.catalog: src/Chaos.cd src/Deutsch.ct
  188.     $(CATCOMP) %(right) CATALOG=%(left)
  189.