1#	NetHack Makefile (VMS) - data files: special levels and other data.
2#	SCCS Id: @(#)Makefile.dat	3.3	1999/03/19
3
4#  Copy this file to [.dat]Makefile.; no editing needed.
5
6MAKE	= $(MMS)
7CD	= set default
8ECHO	= write sys$output
9NOOP	= continue		# don't do anything interesting
10RUN	= mcr			# simplest way to pass command line args
11TOUCH	= append/New _NLA0:	# only one file per $(TOUCH)
12# support directories, relative to each other and to 'src'
13DAT = [-.dat]
14UTL = [-.util]
15WINSHR = [-.win.share]
16WINX11 = [-.win.X11]
17# utilities; must match Makefile.utl in spelling and punctuation
18MAKEDEFS = $(UTL)makedefs.exe;
19LEVCOMP  = $(UTL)lev_comp.exe;
20DGNCOMP  = $(UTL)dgn_comp.exe;
21DLB	 = $(UTL)dlb.exe;
22TILE2X11 = $(UTL)tile2x11.exe;
23
24# note: filespecs have enough punctuation to satisfy DELETE
25MARKERS = spec_levs.timestamp;,quest_levs.timestamp;
26VARDAT	= data.;,rumors.;,quest.dat;,oracles.;,options.;
27DUNGEON = dungeon.;
28X11TILES= x11tiles.;
29# note: the level lists need to be space separated
30QUESTLEVS = Arch.des Barb.des Caveman.des Healer.des Knight.des \
31	Monk.des Priest.des Ranger.des Rogue.des Samurai.des Tourist.des \
32	Valkyrie.des Wizard.des
33SPECLEVS  = bigroom.des castle.des endgame.des gehennom.des knox.des \
34	medusa.des mines.des oracle.des sokoban.des tower.des yendor.des
35
36all :	$(VARDAT) $(DUNGEON) $(MARKERS) $(DLB)
37      @ $(ECHO) "data files are up to date."
38
39# these are convenience targets for "manual" interactive use
40spec_levs :	spev_levs.timestamp
41      @ $(ECHO) "special levels are up to date."
42quest_levs :	quest_levs.timestamp
43      @ $(ECHO) "quest levels are up to date."
44dungeon :	$(DUNGEON)
45      @ $(ECHO) "dungeon is up to date."
46data :		data.;
47      @ $(NOOP)
48rumors :	rumors.;
49      @ $(NOOP)
50quest.dat :	quest.dat;
51      @ $(NOOP)
52oracles :	oracles.;
53      @ $(NOOP)
54options :	options.;
55      @ $(NOOP)
56x11tiles :	$(X11TILES)
57      @ $(NOOP)
58
59$(MAKEDEFS) :
60	$(CD) $(UTL)
61	$(MAKE)$(MAKEFLAGS) $(MAKEDEFS)
62      @ $(CD) $(DAT)
63
64$(DGNCOMP) :
65	$(CD) $(UTL)
66	$(MAKE)$(MAKEFLAGS) $(DGNCOMP)
67      @ $(CD) $(DAT)
68
69$(LEVCOMP) :
70	$(CD) $(UTL)
71	$(MAKE)$(MAKEFLAGS) $(LEVCOMP)
72      @ $(CD) $(DAT)
73
74$(DLB) :
75	$(CD) $(UTL)
76	$(MAKE)$(MAKEFLAGS) $(DLB)
77      @ $(CD) $(DAT)
78
79$(TILE2X11) :
80	$(CD) $(UTL)
81	$(MAKE)$(MAKEFLAGS) $(TILE2X11)
82      @ $(CD) $(DAT)
83
84$(X11TILES) : $(TILE2X11) \
85		$(WINSHR)monsters.txt $(WINSHR)objects.txt $(WINSHR)other.txt
86	$(RUN) $(TILE2X11) \
87		$(WINSHR)monsters.txt $(WINSHR)objects.txt $(WINSHR)other.txt
88
89pet_mark.xbm : $(WINX11)pet_mark.xbm
90	copy $(WINX11)pet_mark.xbm pet_mark.xbm
91
92rip.xpm : $(WINX11)rip.xpm
93	copy $(WINX11)rip.xpm rip.xpm
94
95
96data.; :	data.base $(MAKEDEFS)
97	$(RUN) $(MAKEDEFS) -d
98
99rumors.; :	rumors.tru rumors.fal $(MAKEDEFS)
100	$(RUN) $(MAKEDEFS) -r
101
102quest.dat; :	quest.txt $(MAKEDEFS)
103	$(RUN) $(MAKEDEFS) -q
104
105oracles.; :	oracles.txt $(MAKEDEFS)
106	$(RUN) $(MAKEDEFS) -h
107
108# note: 'options' should have already been made when include/date.h was created
109options.; :	$(MAKEDEFS)
110	$(RUN) $(MAKEDEFS) -v
111
112spec_levs.timestamp; :	$(SPECLEVS) $(LEVCOMP)
113	$(RUN) $(LEVCOMP) $(SPECLEVS)
114	$(TOUCH) spec_levs.timestamp;
115
116quest_levs.timestamp; : $(QUESTLEVS) $(LEVCOMP)
117	$(RUN) $(LEVCOMP) $(QUESTLEVS)
118	$(TOUCH) quest_levs.timestamp;
119
120$(DUNGEON) :	dungeon.def $(MAKEDEFS) $(DGNCOMP)
121	$(RUN) $(MAKEDEFS) -e		!dungeon.def -> dungeon.pdf
122	$(RUN) $(DGNCOMP) dungeon.pdf	!dungeon.pdr -> dungeon
123
124clean :
125      - if f$search("*.*;-1").nes."" then  purge
126      - if f$search("dungeon.pdf").nes."" then	delete dungeon.pdf;
127      - if f$search("*.timestamp").nes."" then	delete $(MARKERS)
128
129spotless :	clean
130      - delete $(VARDAT)
131      - if f$search("$(DUNGEON)").nes."" then  delete $(DUNGEON)
132      - if f$search("*.lev").nes."" then  delete *.lev;
133      - if f$search("$(X11TILES)").nes."" then  delete $(X11TILES)
134      - if f$search("*.x%m").nes."" then  delete *.x%m;		!*.xbm,*.xpm
135      - if f$search("nh*.dlb").nes."" then  delete nh*.dlb;
136      - if f$search("nhdat.lst").nes."" then  delete nhdat.lst;
137