1 # aNetHack 0.0.1 Makefile.gcc $ANH-Date: 1434804544 2015/06/20 12:49:04 $ $ANH-Branch: win32-x64-working $:$ANH-Revision: 1.53 $
3 #==============================================================================
5 # Win32 Compilers Tested:
6 # === TDM-GCC Compiler Suite for Windows ===
7 # --- GCC 4.6 & 4.7 Series ---
8 # *** Standard MinGW 32-bit Edition ***
10 # If you don't have this compiler, you can get it at:
11 # http://tdm-gcc.tdragon.net/
13 #==============================================================================
14 # This is used for building two versions of aNetHack:
16 # A tty port utilizing the Win32 Console I/O subsystem, Console
19 # A Win32 native port built on the Windows API, Graphical aNetHack or
22 # In addition to your C compiler,
24 # if you want to change you will need a
25 # files with suffix workalike for
26 # .y yacc (such as bison)
27 # .l lex (such as flex)
29 # If you have any questions read the sys/winnt/Install.nt file included
30 # with the distribution.
31 #==============================================================================
32 # BUILD DECISIONS SECTION
34 # There are currently only 3 decisions that you have to make.
35 # 1. 32-bit or 64-bit?
36 # 2. Where do you want your build to end up?
37 # 3. Do you want debug information in the executable?
39 #==============================================================================
40 # 1. 32-bit or 64-bit?
49 #---------------------------------------------------------------
50 # 2. Where do you want the game to be built (which folder)?
51 # If not present prior to compilation it gets created.
57 #---------------------------------------------------------------
58 # 3. Do you want debug information in the executable?
63 # This marks the end of the BUILD DECISIONS section.
64 #==============================================================================
66 #===============================================
67 #======= End of Modification Section ===========
68 #===============================================
70 ################################################
72 # Nothing below here should have to be changed.#
74 ################################################
77 # Source directories. Makedefs hardcodes these, don't change them.
80 # aNetHack include files
84 # aNetHack documentation files
92 # NT Win32 specific files
94 # window port files (tty)
96 # window port files (WIN32)
112 #==========================================
113 # Level Compiler Info
114 #==========================================
116 # Yacc/Lex ... if you got 'em.
118 # If you have yacc and lex programs (or work-alike such as bison
119 # and flex), comment out the upper two macros and uncomment
128 # - Specify your yacc and lex programs (or work-alikes) here.
138 # - Specify your flex skeleton file (if needed).
142 #FLEXSKEL = -S../tools/flex.ske
148 #==========================================
150 #==========================================
152 # Optional high-quality BSD random number generation routines
153 # (see pcconf.h). Set to nothing if not used.
156 RANDOM = $(OBJ)/random.o
159 WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0501
160 # To store all the level files,
161 # help files, etc. in a single library file.
162 # USE_DLB = Y is left uncommented
166 ifeq "$(USE_DLB)" "Y"
172 #==========================================
173 # Setting up the compiler and linker
174 # macros. All builds include the base ones.
175 #==========================================
176 cflags = -mms-bitfields
178 ifeq "$(DEBUGINFO)" "Y"
188 CFLAGSBASE = -c $(cflags) -I$(INCL) $(WINPINC) $(cdebug)
189 #LFLAGSBASEC = $(linkdebug)
190 #LFLAGSBASEG = $(linkdebug) -mwindows
193 guilibs = -lcomctl32 -lwinmm
195 #==========================================
197 #==========================================
199 CFLAGSU = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
200 LFLAGSU = $(LFLAGSBASEC)
202 #==========================================
204 #==========================================
206 CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
207 lflags = $(LFLAGSBASEC) $(linkdebuf)
209 ifeq "$(USE_DLB)" "Y"
215 #==========================================
216 #================ MACROS ==================
217 #==========================================
218 # This section creates shorthand macros for many objects
219 # referenced later on in the Makefile.
222 DEFFILE = $(MSWSYS)/$(GAME).def
225 # Shorten up the location for some files
236 MAKESRC = $(U)makedefs.c
238 SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c
240 DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c
242 MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o
244 SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \
245 $(O)alloc.o $(O)decl.o $(O)drawing.o \
246 $(O)monst.o $(O)objects.o $(O)panic.o
248 DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \
249 $(O)alloc.o $(O)panic.o
251 RECOVOBJS = $(O)recover.o
253 TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt
256 # These are not invoked during a normal game build in 3.4
258 TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \
259 $(O)decl.o $(O)monst.o $(O)objects.o
261 TEXT_IO32 = $(O)tilete32.o $(O)tiletx32.o $(O)drawing.o \
262 $(O)decl.o $(O)monst.o $(O)objects.o
264 GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o
265 GIFREADERS32 = $(O)gifrd32.o $(O)alloc.o $(O)panic.o
267 PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o
270 # Object files for the game itself.
273 VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o
274 VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
275 VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
276 VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o
277 VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o
278 VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
279 VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
280 VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
281 VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o
282 VOBJ10 = $(O)mail.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o
283 VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)minion.o $(O)mklev.o
284 VOBJ12 = $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o $(O)mkroom.o
285 VOBJ13 = $(O)mon.o $(O)mondata.o $(O)monmove.o $(O)monst.o
286 VOBJ14 = $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o
287 VOBJ15 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o
288 VOBJ16 = $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o
289 VOBJ17 = $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o
290 VOBJ18 = $(O)quest.o $(O)questpgr.o $(RANDOM) $(O)read.o
291 VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o
292 VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o
293 VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o
294 VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o
295 VOBJ23 = $(O)sys.o $(O)teleport.o $(O)timeout.o $(O)topten.o
296 VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o
297 VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o
298 VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o
299 VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o
303 REGEX = $(O)cppregex.o
305 TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o
307 SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \
308 $(SOUND) $(O)pcmain.o $(O)nhlan.o
310 OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
311 $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
312 $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
313 $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
314 $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
315 $(VOBJ26) $(VOBJ27) $(REGEX)
317 GUIOBJ = $(O)mhaskyn.o $(O)mhdlg.o \
318 $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
319 $(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
320 $(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
322 GUIHDR = $(MSWIN)/mhaskyn.h $(MSWIN)/mhdlg.h $(MSWIN)/mhfont.h \
323 $(MSWIN)/mhinput.h $(MSWIN)/mhmain.h $(MSWIN)/mhmap.h \
324 $(MSWIN)/mhmenu.h $(MSWIN)/mhmsg.h $(MSWIN)/mhmsgwnd.h \
325 $(MSWIN)/mhrip.h $(MSWIN)/mhstatus.h \
326 $(MSWIN)/mhtext.h $(MSWIN)/resource.h $(MSWIN)/winMS.h
328 KEYDLLS = $(GAMEDIR)/nhdefkey.dll $(GAMEDIR)/nh340key.dll $(GAMEDIR)/nhraykey.dll
330 TILEUTIL16 = $(UTIL)/tile2bmp.exe
331 TILEBMP16 = $(SRC)/tiles.bmp
333 TILEUTIL32 = $(UTIL)/til2bm32.exe
334 TILEBMP32 = $(SRC)/tiles32.bmp
336 SOUND = $(OBJ)/ntsound.o
339 VVOBJ = $(O)version.o
341 ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ)
343 OPTIONS_FILE = $(DAT)\options
345 #==========================================
347 #==========================================
349 CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \
350 $(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \
351 $(INCL)/system.h $(INCL)/unixconf.h $(INCL)/os2conf.h \
352 $(INCL)/micro.h $(INCL)/pcconf.h $(INCL)/tosconf.h \
353 $(INCL)/amiconf.h $(INCL)/macconf.h $(INCL)/beconf.h \
356 HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \
357 $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \
358 $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \
359 $(INCL)/permonst.h $(INCL)/monattk.h \
360 $(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \
361 $(INCL)/wintype.h $(INCL)/decl.h $(INCL)/quest.h \
362 $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \
363 $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h $(INCL)/lint.h \
364 $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \
365 $(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h $(INCL)/rm.h \
366 $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \
367 $(INCL)/rect.h $(INCL)/region.h $(INCL)/winprocs.h \
368 $(INCL)/wintty.h $(INCL)/sys.h $(INCL)/trampoli.h
370 LEV_H = $(INCL)/lev.h
371 DGN_FILE_H = $(INCL)/dgn_file.h
372 LEV_COMP_H = $(INCL)/lev_comp.h
373 SP_LEV_H = $(INCL)/sp_lev.h
374 TILE_H = ../win/share/tile.h
376 #==========================================
378 #==========================================
380 DATABASE = $(DAT)/data.base
382 #==========================================
383 #================ RULES ==================
384 #==========================================
386 .SUFFIXES: .exe .o .til .uu .c .y .l
388 #==========================================
389 # Rules for files in src
390 #==========================================
393 $(cc) $(CFLAGS) -o$@ $<
395 $(OBJ)/%.o : $(SRC)/%.c
396 $(cc) $(CFLAGS) -o$@ $<
398 #==========================================
399 # Rules for files in sys/share
400 #==========================================
402 $(OBJ)/%.o : $(SSYS)/%.c
403 $(cc) $(CFLAGS) -o$@ $<
405 $(OBJ)/%.o : $(SSYS)/%.cpp
406 g++ $(CFLAGS) -std=c++11 -o$@ $<
408 #==========================================
409 # Rules for files in sys/winnt
410 #==========================================
412 $(OBJ)/%.o : $(MSWSYS)/%.c
413 $(cc) $(CFLAGS) -o$@ $<
415 $(INCL)/%.h : $(MSWSYS)/%.h
418 #==========================================
419 # Rules for files in util
420 #==========================================
422 $(OBJ)/%.o : $(UTIL)/%.c
423 $(cc) $(CFLAGSU) -o$@ $<
425 #==========================================
426 # Rules for files in win/share
427 #==========================================
429 $(OBJ)/%.o : $(WSHR)/%.c
430 $(cc) $(CFLAGS) -o$@ $<
432 $(INCL)/%.h : $(WSHR)/%.h
435 #{$(WSHR)}.txt{$(DAT)}.txt:
438 #==========================================
439 # Rules for files in win/tty
440 #==========================================
442 $(OBJ)/%.o : $(TTY)/%.c
443 $(cc) $(CFLAGS) -o$@ $<
445 #==========================================
446 # Rules for files in win/win32
447 #==========================================
449 $(OBJ)/%.o : $(MSWIN)/%.c
450 $(cc) $(CFLAGS) -o$@ $<
452 #==========================================
453 #=============== TARGETS ==================
454 #==========================================
456 # Since DOS doesn't allow / as path separator, and GCC doesn't allow \ as
457 # path separator, we must change all pathnames when performing DOS commands.
458 # This is done by blindly applying $(subst /,\, ...) on every command.
459 # Where any command contain / for another reason (switch char, or echoing
460 # comment lines to lev/dungeon files) a little more care is taken.
463 # The default make target (so just typing 'nmake' is useful).
473 install: graphicschk $(O)obj.tag $(GAMEDIR)/aNetHack.exe $(GAMEDIR)/aNetHackW.exe $(O)install.tag
474 @echo aNetHack is up to date.
478 $(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \
479 $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag $(DLB)
480 ifeq "$(USE_DLB)" "Y"
481 $(subst /,\,copy anhdat $(GAMEDIR))
482 $(subst /,\,copy $(DAT)/license $(GAMEDIR))
483 $(subst /,\,copy $(DAT)/opthelp $(GAMEDIR))
485 $(subst /,\,copy $(DAT)/*. $(GAMEDIR))
486 $(subst /,\,copy $(DAT)/*.dat $(GAMEDIR))
487 $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR))
488 $(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile)
490 $(subst /,\,if not exist $(GAMEDIR)/sysconf copy $(MSWSYS)/sysconf $(GAMEDIR))
491 $(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR))
492 $(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt)
493 $(subst /,\,if exist $(DOC)/anethack.txt copy $(DOC)/anethack.txt $(GAMEDIR)/aNetHack.txt)
494 $(subst /,\,copy $(MSWSYS)/defaults.nh $(GAMEDIR)/defaults.nh)
495 $(subst /,\,echo install done > $@)
497 # copy $(MSWSYS)/winnt.hlp $(GAMEDIR)
499 recover: $(U)recover.exe
500 $(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR))
501 $(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)/recover.txt)
503 $(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \
504 $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \
505 $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \
506 $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \
507 $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \
508 $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \
509 $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/sokoban.des \
510 $(DAT)/tourist.des $(DAT)/valkyrie.des $(DAT)/wizard.des
511 $(subst /,\,$(U)levcomp $(DAT)/bigroom.des)
512 $(subst /,\,$(U)levcomp $(DAT)/castle.des)
513 $(subst /,\,$(U)levcomp $(DAT)/endgame.des)
514 $(subst /,\,$(U)levcomp $(DAT)/gehennom.des)
515 $(subst /,\,$(U)levcomp $(DAT)/knox.des)
516 $(subst /,\,$(U)levcomp $(DAT)/mines.des)
517 $(subst /,\,$(U)levcomp $(DAT)/medusa.des)
518 $(subst /,\,$(U)levcomp $(DAT)/oracle.des)
519 $(subst /,\,$(U)levcomp $(DAT)/sokoban.des)
520 $(subst /,\,$(U)levcomp $(DAT)/tower.des)
521 $(subst /,\,$(U)levcomp $(DAT)/yendor.des)
522 $(subst /,\,$(U)levcomp $(DAT)/arch.des)
523 $(subst /,\,$(U)levcomp $(DAT)/barb.des)
524 $(subst /,\,$(U)levcomp $(DAT)/caveman.des)
525 $(subst /,\,$(U)levcomp $(DAT)/healer.des)
526 $(subst /,\,$(U)levcomp $(DAT)/knight.des)
527 $(subst /,\,$(U)levcomp $(DAT)/monk.des)
528 $(subst /,\,$(U)levcomp $(DAT)/priest.des)
529 $(subst /,\,$(U)levcomp $(DAT)/ranger.des)
530 $(subst /,\,$(U)levcomp $(DAT)/rogue.des)
531 $(subst /,\,$(U)levcomp $(DAT)/samurai.des)
532 $(subst /,\,$(U)levcomp $(DAT)/tourist.des)
533 $(subst /,\,$(U)levcomp $(DAT)/valkyrie.des)
534 $(subst /,\,$(U)levcomp $(DAT)/wizard.des)
535 $(subst /,\,copy *.lev $(DAT))
536 $(subst /,\,del *.lev)
537 $(subst /,\,echo sp_levs done > $(O)sp_lev.tag)
539 $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \
540 $(SRC)/monstr.c $(SRC)/vis_tab.c $(U)levcomp.exe $(INCL)/vis_tab.h \
541 $(U)dgncomp.exe $(TILEUTIL16)
542 $(subst /,\,@echo utilities made >$@)
543 @echo utilities made.
545 tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
546 @echo Optional tile development utilities are up to date.
548 $(O)winres.o: $(TILEBMP16) $(MSWIN)/winhack.rc $(MSWIN)/mnsel.bmp \
549 $(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \
550 $(MSWIN)/petmark.bmp $(MSWIN)/pilemark.bmp $(MSWIN)/aNetHack.ico $(MSWIN)/rip.bmp \
552 @$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc
554 $(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/aNetHack.ico
555 @$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
557 #==========================================
559 #==========================================
561 $(subst /,\,@if not exist $(GAMEDIR)/*.* echo creating directory $(GAMEDIR))
562 $(subst /,\,@if not exist $(GAMEDIR)/*.* mkdir $(GAMEDIR))
563 $(subst /,\,@echo directory created > $@)
565 $(GAMEDIR)/aNetHack.exe : $(O)gamedir.tag $(O)tile.o $(O)nttty.o $(O)guistub.o \
566 $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)conres.o $(KEYDLLS)
568 $(link) $(lflags) -o$@ $(ALLOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o \
569 $(O)guistub.o $(O)conres.o $(conlibs) -static -lstdc++
570 $(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
572 $(GAMEDIR)/aNetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \
573 $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winres.o $(KEYDLLS)
575 $(link) $(lflags) -mwindows -o$@ $(ALLOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o \
576 $(O)winres.o $(guilibs) -static -lstdc++
577 $(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
580 $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c
582 $(GAMEDIR)/nhdefkey.dll : $(O)nhdefkey.o $(O)gamedir.tag
584 $(cc) -shared -Wl,--export-all-symbols \
585 -Wl,--add-stdcall-alias -o $@ $<
588 $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nh340key.c
590 $(GAMEDIR)/nh340key.dll : $(O)nh340key.o $(O)gamedir.tag
592 $(cc) -shared -Wl,--export-all-symbols \
593 -Wl,--add-stdcall-alias -o $@ $<
596 $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhraykey.c
598 $(GAMEDIR)/nhraykey.dll : $(O)nhraykey.o $(O)gamedir.tag
600 $(cc) -shared -Wl,--export-all-symbols \
601 -Wl,--add-stdcall-alias -o $@ $<
603 $(GAME)_.ico : $(MSWSYS)/$(GAME).ico
604 $(subst /,\,@copy $(MSWSYS)/$(GAME).ico $@)
606 #==========================================
607 # Create directory for holding object files
608 #==========================================
612 @echo NOTE: This build will include tile support.
614 $(subst /,\,@echo graphicschk > graphicschk)
620 #==========================================
622 #==========================================
624 $(U)makedefs.exe: $(MAKEOBJS)
625 @$(link) $(LFLAGSU) -o$@ $(MAKEOBJS)
627 $(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \
628 $(INCL)/objclass.h $(INCL)/monsym.h $(INCL)/qtext.h \
629 $(INCL)/patchlevel.h $(U)makedefs.c $(O)obj.tag
630 $(cc) $(CFLAGSU) -o$@ $(U)makedefs.c
633 # date.h should be remade every time any of the source or include
637 $(INCL)/date.h $(OPTIONS_FILE): $(U)makedefs.exe
638 $(subst /,\,$(U)makedefs -v)
640 $(INCL)/onames.h : $(U)makedefs.exe
641 $(subst /,\,$(U)makedefs -o)
643 $(INCL)/pm.h : $(U)makedefs.exe
644 $(subst /,\,$(U)makedefs -p)
646 #$(INCL)/trap.h : $(U)makedefs.exe
649 $(SRC)/monstr.c: $(U)makedefs.exe
650 $(subst /,\,$(U)makedefs -m)
652 $(INCL)/vis_tab.h: $(U)makedefs.exe
653 $(subst /,\,$(U)makedefs -z)
655 $(SRC)/vis_tab.c: $(U)makedefs.exe
656 $(subst /,\,$(U)makedefs -z)
658 $(DAT)/engrave: $(DAT)/engrave.txt $(U)makedefs.exe
659 $(subst /,\,$(U)makedefs -s)
661 $(DAT)/epitaph: $(DAT)/epitaph.txt $(U)makedefs.exe
662 $(subst /,\,$(U)makedefs -s)
664 $(DAT)/bogusmon: $(DAT)/bogusmon.txt $(U)makedefs.exe
665 $(subst /,\,$(U)makedefs -s)
669 #==========================================
670 # uudecode utility and uuencoded targets
671 #==========================================
673 $(U)uudecode.exe: $(O)uudecode.o
674 @$(link) $(LFLAGSU) -o$@ $(O)uudecode.o
676 $(O)uudecode.o: $(SSYS)/uudecode.c
678 $(MSWSYS)/aNetHack.ico : $(U)uudecode.exe $(MSWSYS)/nhico.uu
679 $(subst /,\,$(U)uudecode.exe $(MSWSYS)/nhico.uu)
680 $(subst /,\,copy aNetHack.ico $@)
683 $(MSWIN)/aNetHack.ico : $(MSWSYS)/aNetHack.ico
684 $(subst /,\,copy $< $@)
686 $(MSWIN)/mnsel.bmp: $(U)uudecode.exe $(MSWIN)/mnsel.uu
687 $(subst /,\,$(U)uudecode.exe $(MSWIN)/mnsel.uu)
688 $(subst /,\,copy mnsel.bmp $@)
691 $(MSWIN)/mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)/mnselcnt.uu
692 $(subst /,\,$(U)uudecode.exe $(MSWIN)/mnselcnt.uu)
693 $(subst /,\,copy mnselcnt.bmp $@)
696 $(MSWIN)/mnunsel.bmp: $(U)uudecode.exe $(MSWIN)/mnunsel.uu
697 $(subst /,\,$(U)uudecode.exe $(MSWIN)/mnunsel.uu)
698 $(subst /,\,copy mnunsel.bmp $@)
701 $(MSWIN)/petmark.bmp: $(U)uudecode.exe $(MSWIN)/petmark.uu
702 $(subst /,\,$(U)uudecode.exe $(MSWIN)/petmark.uu)
703 $(subst /,\,copy petmark.bmp $@)
706 $(MSWIN)/pilemark.bmp: $(U)uudecode.exe $(MSWIN)/pilemark.uu
707 $(subst /,\,$(U)uudecode.exe $(MSWIN)/pilemark.uu)
708 $(subst /,\,copy pilemark.bmp $@)
711 $(MSWIN)/rip.bmp: $(U)uudecode.exe $(MSWIN)/rip.uu
712 $(subst /,\,$(U)uudecode.exe $(MSWIN)/rip.uu)
713 $(subst /,\,copy rip.bmp $@)
716 $(MSWIN)/splash.bmp: $(U)uudecode.exe $(MSWIN)/splash.uu
717 $(subst /,\,$(U)uudecode.exe $(MSWIN)/splash.uu)
718 $(subst /,\,copy splash.bmp $@)
722 #==========================================
723 # Level Compiler Stuff
724 #==========================================
726 LEVCFLAGS=$(cflags) -c -DWIN32 -D_WIN32 -I../include $(cdebug) -DDLB
728 $(U)levcomp.exe: $(SPLEVOBJS)
730 @$(link) $(LFLAGSU) -o$@ $(SPLEVOBJS)
732 $(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c
733 $(cc) $(LEVCFLAGS) -o$@ $(U)lev_yacc.c
735 $(O)lev_$(LEX).o: $(HACK_H) $(INCL)/lev_comp.h $(SP_LEV_H) \
737 $(cc) $(LEVCFLAGS) -o$@ $(U)lev_$(LEX).c
739 $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
740 $(cc) $(LEVCFLAGS) -o$@ $(U)lev_main.c
743 $(U)lev_yacc.c $(INCL)/lev_comp.h : $(U)lev_comp.y
744 ifeq "$(DO_YACC)" "YACC_ACT"
745 $(subst /,\,$(YACC) -d $(U)lev_comp.y)
746 $(subst /,\,copy $(YTABC) $(U)lev_yacc.c)
747 $(subst /,\,copy $(YTABH) $(INCL)/lev_comp.h)
748 $(subst /,\,@del $(YTABC))
749 $(subst /,\,@del $(YTABH))
752 @echo $(U)lev_comp.y has changed.
753 @echo To update $(U)lev_yacc.c and $(INCL)/lev_comp.h run $(YACC).
755 @echo For now, we will copy the prebuilt lev_yacc.c and
756 @echo lev_comp.h from $(SSYS) into $(UTIL) and use them.
757 $(subst /,\,@copy $(SSYS)/lev_yacc.c $(U)lev_yacc.c >nul)
758 $(subst /,\,@copy $(SSYS)/lev_comp.h $(INCL)/lev_comp.h >nul)
759 $(subst /,\,echo.>>$(U)lev_yacc.c)
760 $(subst /,\,echo.>>$(INCL)/lev_comp.h)
763 $(U)lev_$(LEX).c: $(U)lev_comp.l
764 ifeq "$(DO_LEX)" "LEX_ACT"
765 $(subst /,\,$(LEX) $(FLEXSKEL) $(U)lev_comp.l)
766 $(subst /,\,copy $(LEXYYC) $@)
767 $(subst /,\,@del $(LEXYYC))
769 @echo $(U)lev_comp.l has changed. To update $@ run $(LEX).
771 @echo For now, we will copy the prebuilt lev_lex.c
772 @echo from $(SSYS) into $(UTIL) and use it.
773 $(subst /,\,@copy $(SSYS)/lev_lex.c $@ >nul)
774 $(subst /,\,echo.>>$@)
777 #==========================================
778 # Dungeon Compiler Stuff
779 #==========================================
781 $(U)dgncomp.exe: $(DGNCOMPOBJS)
783 @$(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
786 $(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)/dgn_comp.h $(U)dgn_yacc.c
787 $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_yacc.c
789 $(O)dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)/dgn_comp.h \
791 $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_$(LEX).c
793 $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
794 $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_main.c
796 $(U)dgn_yacc.c $(INCL)/dgn_comp.h : $(U)dgn_comp.y
797 ifeq "$(DO_YACC)" "YACC_ACT"
798 $(subst /,\,$(YACC) -d $(U)dgn_comp.y)
799 $(subst /,\,copy $(YTABC) $(U)dgn_yacc.c)
800 $(subst /,\,copy $(YTABH) $(INCL)/dgn_comp.h)
801 $(subst /,\,@del $(YTABC))
802 $(subst /,\,@del $(YTABH))
804 @echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and
805 @echo $(INCL)/dgn_comp.h run $(YACC).
807 @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and
808 @echo dgn_comp.h from $(SSYS) into $(UTIL) and use them.
809 $(subst /,\,@copy $(SSYS)/dgn_yacc.c $(U)dgn_yacc.c >nul)
810 $(subst /,\,@copy $(SSYS)/dgn_comp.h $(INCL)/dgn_comp.h >nul)
811 $(subst /,\,echo.>>$(U)dgn_yacc.c)
812 $(subst /,\,echo.>>$(INCL)/dgn_comp.h)
815 $(U)dgn_$(LEX).c: $(U)dgn_comp.l
816 ifeq "$(DO_LEX)" "LEX_ACT"
817 $(subst /,\,$(LEX) $(FLEXSKEL) $(U)dgn_comp.l)
818 $(subst /,\,copy $(LEXYYC) $@)
819 $(subst /,\,@del $(LEXYYC))
821 @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX).
823 @echo For now, we will copy the prebuilt dgn_lex.c
824 @echo from $(SSYS) into $(UTIL) and use it.
825 $(subst /,\,@copy $(SSYS)/dgn_lex.c $@ >nul)
826 $(subst /,\,echo.>>$@)
829 #==========================================
830 # Create directory for holding object files
831 #==========================================
834 $(subst /,\,@if not exist $(OBJ)/*.* echo creating directory $(OBJ))
835 $(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ))
836 $(subst /,\,@echo directory created > $@)
839 #==========================================
840 #=========== SECONDARY TARGETS ============
841 #==========================================
843 #===========================================
844 # Header files NOT distributed in ../include
845 #===========================================
847 $(INCL)/win32api.h: $(MSWSYS)/win32api.h
848 $(subst /,\,copy $(MSWSYS)/win32api.h $@)
851 #==========================================
852 # DLB utility and anhdat file creation
853 #==========================================
855 $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
856 @$(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
859 $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h
860 $(cc) $(CFLAGS) -o$@ $(SRC)/dlb.c
862 $(O)dlb_main.o: $(UTIL)/dlb_main.c $(INCL)/config.h $(INCL)/dlb.h
863 $(cc) $(CFLAGS) -o$@ $(UTIL)/dlb_main.c
865 $(DAT)/porthelp: $(MSWSYS)/porthelp
866 $(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul)
868 anhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \
869 $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp \
870 $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp $(DAT)/dungeon \
871 $(DAT)/porthelp $(DAT)/license $(DAT)/engrave $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag
872 $(subst /,\,echo data >$(DAT)/dlb.lst)
873 $(subst /,\,echo oracles >>$(DAT)/dlb.lst)
874 $(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst)
875 $(subst /,\,if exist $(DAT)/ttyoptions echo ttyoptions >>$(DAT)/dlb.lst)
876 $(subst /,\,if exist $(DAT)/guioptions echo guioptions >>$(DAT)/dlb.lst)
877 $(subst /,\,if exist $(DAT)/porthelp echo porthelp >>$(DAT)/dlb.lst)
878 $(subst /,\,echo quest.dat >>$(DAT)/dlb.lst)
879 $(subst /,\,echo rumors >>$(DAT)/dlb.lst)
880 $(subst /,\,echo help >>$(DAT)/dlb.lst)
881 $(subst /,\,echo hh >>$(DAT)/dlb.lst)
882 $(subst /,\,echo cmdhelp >>$(DAT)/dlb.lst)
883 $(subst /,\,echo history >>$(DAT)/dlb.lst)
884 $(subst /,\,echo opthelp >>$(DAT)/dlb.lst)
885 $(subst /,\,echo wizhelp >>$(DAT)/dlb.lst)
886 $(subst /,\,echo dungeon >>$(DAT)/dlb.lst)
887 $(subst /,\,echo license >>$(DAT)/dlb.lst)
888 $(subst /,\,echo engrave >>$(DAT)/dlb.lst)
889 $(subst /,\,echo epitaph >>$(DAT)/dlb.lst)
890 $(subst /,\,echo bogusmon >>$(DAT)/dlb.lst)
891 $(subst /,\,echo tribute >>$(DAT)/dlb.lst)
892 dir /l /b /-p $(subst /,\,$(DAT)/*.lev >>$(DAT)/dlb.lst)
893 $(subst /,\,$(U)dlb_main CcIf $(DAT) dlb.lst $(SRC)/anhdat)
895 #==========================================
897 #==========================================
899 $(U)recover.exe: $(RECOVOBJS)
900 $(link) $(LFLAGSU) -o$@ $(RECOVOBJS)
902 $(O)recover.o: $(CONFIG_H) $(U)recover.c $(INCL)/win32api.h
903 $(cc) $(CFLAGSU) -o$@ $(U)recover.c
905 #==========================================
907 #==========================================
909 $(SRC)/tile.c: $(U)tilemap.exe
910 @echo A new $@ has been created
913 $(U)tilemap.exe: $(O)tilemap.o
914 @$(link) $(LFLAGSU) -o$@ $(O)tilemap.o
916 $(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H)
917 $(cc) $(CFLAGSU) -o$@ $(WSHR)/tilemap.c
919 $(O)tiletx32.o: $(WSHR)/tilemap.c $(HACK_H)
920 $(cc) $(CFLAGS) -DTILETEXT -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/tilemap.c
922 $(O)tiletxt.o: $(WSHR)/tilemap.c $(HACK_H)
923 $(cc) $(CFLAGS) -DTILETEXT -o$@ $(WSHR)/tilemap.c
925 $(O)gifread.o: $(WSHR)/gifread.c $(CONFIG_H) $(TILE_H)
926 $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/gifread.c
928 $(O)gifrd32.o: $(WSHR)/gifread.c $(CONFIG_H) $(TILE_H)
929 $(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/gifread.c
931 $(O)ppmwrite.o: $(WSHR)/ppmwrite.c $(CONFIG_H) $(TILE_H)
932 $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/ppmwrite.c
934 $(O)tiletext.o: $(WSHR)/tiletext.c $(CONFIG_H) $(TILE_H)
935 $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c
937 $(O)tilete32.o: $(WSHR)/tiletext.c $(CONFIG_H) $(TILE_H)
938 $(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/tiletext.c
940 #==========================================
941 # Optional Tile Utilities
942 #==========================================
944 $(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
946 @$(link) $(LFLAGSU) -o$@ $(GIFREADERS) $(TEXT_IO)
948 $(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
950 @$(link) $(LFLAGSU) -o$@ $(GIFREADERS32) $(TEXT_IO32)
953 $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
955 @$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
958 $(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
959 @echo Creating 16x16 binary tile files (this may take some time)
960 $(subst /,\,@$(U)tile2bmp $(TILEBMP16))
962 #$(TILEBMP32): $(TILEUTIL32) $(TILEFILES32)
963 # @echo Creating 32x32 binary tile files (this may take some time)
964 # $(subst /,\,@$(U)til2bm32 $(TILEBMP32))
966 $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
968 @$(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO)
970 $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
972 @$(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32)
974 $(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)/win32api.h
975 $(cc) $(CFLAGS) -mno-ms-bitfields -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
977 $(O)til2bm32.o: $(WSHR)/til2bm32.c $(HACK_H) $(TILE_H) $(INCL)/win32api.h
978 $(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/til2bm32.c
980 #==========================================
982 #==========================================
985 $(subst /,\,if exist graphicschk del graphicschk)
986 $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h)
987 $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h)
988 $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h)
989 $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h)
990 $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c)
991 $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c)
992 $(subst /,\,if exist $(U)*.lnk del $(U)*.lnk)
993 $(subst /,\,if exist $(U)*.map del $(U)*.map)
994 $(subst /,\,if exist $(DAT)/data del $(DAT)/data)
995 $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
996 $(subst /,\,if exist $(DAT)/???-fil?.lev del $(DAT)/???-fil?.lev)
997 $(subst /,\,if exist $(DAT)/???-goal.lev del $(DAT)/???-goal.lev)
998 $(subst /,\,if exist $(DAT)/???-loca.lev del $(DAT)/???-loca.lev)
999 $(subst /,\,if exist $(DAT)/???-strt.lev del $(DAT)/???-strt.lev)
1000 $(subst /,\,if exist $(DAT)/air.lev del $(DAT)/air.lev)
1001 $(subst /,\,if exist $(DAT)/asmodeus.lev del $(DAT)/asmodeus.lev)
1002 $(subst /,\,if exist $(DAT)/astral.lev del $(DAT)/astral.lev)
1003 $(subst /,\,if exist $(DAT)/baalz.lev del $(DAT)/baalz.lev)
1004 $(subst /,\,if exist $(DAT)/bigrm-*.lev del $(DAT)/bigrm-*.lev)
1005 $(subst /,\,if exist $(DAT)/castle.lev del $(DAT)/castle.lev)
1006 $(subst /,\,if exist $(DAT)/data del $(DAT)/data)
1007 $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon)
1008 $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf)
1009 $(subst /,\,if exist $(DAT)/earth.lev del $(DAT)/earth.lev)
1010 $(subst /,\,if exist $(DAT)/fakewiz?.lev del $(DAT)/fakewiz?.lev)
1011 $(subst /,\,if exist $(DAT)/fire.lev del $(DAT)/fire.lev)
1012 $(subst /,\,if exist $(DAT)/juiblex.lev del $(DAT)/juiblex.lev)
1013 $(subst /,\,if exist $(DAT)/knox.lev del $(DAT)/knox.lev)
1014 $(subst /,\,if exist $(DAT)/medusa-?.lev del $(DAT)/medusa-?.lev)
1015 $(subst /,\,if exist $(DAT)/mine*.lev del $(DAT)/mine*.lev)
1016 $(subst /,\,if exist $(DAT)/options del $(DAT)/options)
1017 $(subst /,\,if exist $(DAT)/ttyoptions del $(DAT)/ttyoptions)
1018 $(subst /,\,if exist $(DAT)/guioptions del $(DAT)/guioptions)
1019 $(subst /,\,if exist $(DAT)/oracle.lev del $(DAT)/oracle.lev)
1020 $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles)
1021 $(subst /,\,if exist $(DAT)/orcus.lev del $(DAT)/orcus.lev)
1022 $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
1023 $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat)
1024 $(subst /,\,if exist $(DAT)/sanctum.lev del $(DAT)/sanctum.lev)
1025 $(subst /,\,if exist $(DAT)/soko?-?.lev del $(DAT)/soko?-?.lev)
1026 $(subst /,\,if exist $(DAT)/tower?.lev del $(DAT)/tower?.lev)
1027 $(subst /,\,if exist $(DAT)/valley.lev del $(DAT)/valley.lev)
1028 $(subst /,\,if exist $(DAT)/water.lev del $(DAT)/water.lev)
1029 $(subst /,\,if exist $(DAT)/wizard?.lev del $(DAT)/wizard?.lev)
1030 $(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag)
1031 $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c)
1032 $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c)
1033 $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe)
1034 $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst)
1035 $(subst /,\,if exist anhdat. del anhdat.)
1037 $(subst /,\,rmdir $(OBJ)) /s /Q
1041 $(subst /,\,if exist $(O)*.o del $(O)*.o)
1042 $(subst /,\,if exist $(O)utility.tag del $(O)utility.tag)
1043 $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe)
1044 $(subst /,\,if exist $(U)levcomp.exe del $(U)levcomp.exe)
1045 $(subst /,\,if exist $(U)dgncomp.exe del $(U)dgncomp.exe)
1046 $(subst /,\,if exist $(SRC)/*.lnk del $(SRC)/*.lnk)
1047 $(subst /,\,if exist $(SRC)/*.map del $(SRC)/*.map)
1048 $(subst /,\,if exist $(O)install.tag del $(O)install.tag)
1049 $(subst /,\,if exist $(O)gamedir.tag del $(O)gamedir.tag)
1050 $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag)
1051 $(subst /,\,if exist $(TILEBMP16) del $(TILEBMP16))
1052 $(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32))
1054 #===================================================================
1055 # OTHER DEPENDENCIES
1056 #===================================================================
1062 $(DAT)/data: $(O)utility.tag $(DATABASE)
1063 $(subst /,\,$(U)makedefs -d)
1065 $(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal
1066 $(subst /,\,$(U)makedefs -r)
1068 $(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt
1069 $(subst /,\,$(U)makedefs -q)
1071 $(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt
1072 $(subst /,\,$(U)makedefs -h)
1074 $(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def
1075 $(subst /,\,$(U)makedefs -e)
1076 $(subst /,\,$(U)dgncomp $(DAT)/dungeon.pdf)
1082 $(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)/win32api.h $(MSWSYS)/nttty.c
1083 $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(MSWSYS)/nttty.c
1084 $(O)winnt.o: $(HACK_H) $(INCL)/win32api.h $(MSWSYS)/winnt.c
1085 $(cc) $(CFLAGS) -o$@ $(MSWSYS)/winnt.c
1086 $(O)ntsound.o: $(HACK_H) $(MSWSYS)/ntsound.c
1087 $(cc) $(CFLAGS) -o$@ $(MSWSYS)/ntsound.c
1090 #if you aren't linking in the full gui then
1091 #include the following stub for proper linkage.
1093 $(O)guistub.o: $(HACK_H) $(MSWSYS)/stubs.c
1094 @$(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c
1096 #if you aren't linking in the full tty then
1097 #include the following stub for proper linkage.
1099 $(O)ttystub.o: $(HACK_H) $(MSWSYS)/stubs.c
1100 @$(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c
1102 $(O)tile.o: $(SRC)/tile.c $(HACK_H)
1108 $(O)panic.o: $(U)panic.c $(CONFIG_H)
1109 $(cc) $(CFLAGS) -o$@ $(U)panic.c
1112 # The rest are stolen from sys/unix/Makefile.src,
1113 # with the following changes:
1114 # * ../include changed to $(INCL)
1115 # * -c (which is included in CFLAGS) substituted
1117 # * targets prefixed with $(O)
1118 # * $(CC) changed to $(cc)
1119 # but otherwise untouched.
1120 # That means that there is some irrelevant stuff
1121 # in here, but maintenance should be easier.
1123 $(O)tos.o: ../sys/atari/tos.c $(HACK_H) $(INCL)/tcap.h
1124 $(cc) $(CFLAGS) -o$@ ../sys/atari/tos.c
1125 $(O)pcmain.o: ../sys/share/pcmain.c $(HACK_H) $(INCL)/dlb.h \
1127 $(cc) $(CFLAGS) -o$@ ../sys/share/pcmain.c
1128 $(O)pcsys.o: ../sys/share/pcsys.c $(HACK_H)
1129 $(cc) $(CFLAGS) -o$@ ../sys/share/pcsys.c
1130 $(O)pctty.o: ../sys/share/pctty.c $(HACK_H)
1131 $(cc) $(CFLAGS) -o$@ ../sys/share/pctty.c
1132 $(O)pcunix.o: ../sys/share/pcunix.c $(HACK_H)
1133 $(cc) $(CFLAGS) -o$@ ../sys/share/pcunix.c
1134 $(O)random.o: ../sys/share/random.c $(HACK_H)
1135 $(cc) $(CFLAGS) -o$@ ../sys/share/random.c
1136 $(O)ioctl.o: ../sys/share/ioctl.c $(HACK_H) $(INCL)/tcap.h
1137 $(cc) $(CFLAGS) -o$@ ../sys/share/ioctl.c
1138 $(O)unixtty.o: ../sys/share/unixtty.c $(HACK_H)
1139 $(cc) $(CFLAGS) -o$@ ../sys/share/unixtty.c
1140 $(O)unixmain.o: ../sys/unix/unixmain.c $(HACK_H) $(INCL)/dlb.h
1141 $(cc) $(CFLAGS) -o$@ ../sys/unix/unixmain.c
1142 $(O)unixunix.o: ../sys/unix/unixunix.c $(HACK_H)
1143 $(cc) $(CFLAGS) -o$@ ../sys/unix/unixunix.c
1144 $(O)unixres.o: ../sys/unix/unixres.c $(CONFIG_H)
1145 $(cc) $(CFLAGS) -o$@ ../sys/unix/unixres.c
1146 $(O)bemain.o: ../sys/be/bemain.c $(HACK_H) $(INCL)/dlb.h
1147 $(cc) $(CFLAGS) -o$@ ../sys/be/bemain.c
1148 $(O)getline.o: ../win/tty/getline.c $(HACK_H) $(INCL)/func_tab.h
1149 $(cc) $(CFLAGS) -o$@ ../win/tty/getline.c
1150 $(O)termcap.o: ../win/tty/termcap.c $(HACK_H) $(INCL)/tcap.h
1151 $(cc) $(CFLAGS) -o$@ ../win/tty/termcap.c
1152 $(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h
1153 $(cc) $(CFLAGS) -o$@ ../win/tty/topl.c
1154 $(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \
1155 $(INCL)/date.h $(INCL)/patchlevel.h $(INCL)/tcap.h
1156 $(cc) $(CFLAGS) -o$@ ../win/tty/wintty.c
1157 $(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \
1159 $(cc) $(CFLAGS) -o$@ ../win/X11/Window.c
1160 $(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H)
1161 $(cc) $(CFLAGS) -o$@ ../win/X11/dialogs.c
1162 $(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \
1163 $(INCL)/patchlevel.h ../win/X11/nh72icon \
1164 ../win/X11/nh56icon ../win/X11/nh32icon
1165 $(cc) $(CFLAGS) -o$@ ../win/X11/winX.c
1166 $(O)winmap.o: ../win/X11/winmap.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/dlb.h \
1167 $(INCL)/winX.h $(INCL)/tile2x11.h
1168 $(cc) $(CFLAGS) -o$@ ../win/X11/winmap.c
1169 $(O)winmenu.o: ../win/X11/winmenu.c $(HACK_H) $(INCL)/winX.h
1170 $(cc) $(CFLAGS) -o$@ ../win/X11/winmenu.c
1171 $(O)winmesg.o: ../win/X11/winmesg.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/winX.h
1172 $(cc) $(CFLAGS) -o$@ ../win/X11/winmesg.c
1173 $(O)winmisc.o: ../win/X11/winmisc.c $(HACK_H) $(INCL)/func_tab.h \
1175 $(cc) $(CFLAGS) -o$@ ../win/X11/winmisc.c
1176 $(O)winstat.o: ../win/X11/winstat.c $(HACK_H) $(INCL)/winX.h
1177 $(cc) $(CFLAGS) -o$@ ../win/X11/winstat.c
1178 $(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h
1179 $(cc) $(CFLAGS) -o$@ ../win/X11/wintext.c
1180 $(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h
1181 $(cc) $(CFLAGS) -o$@ ../win/X11/winval.c
1182 $(O)tile.o: $(SRC)/tile.c $(HACK_H)
1183 $(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \
1184 ../win/gnome/gnmain.h
1185 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c
1186 $(O)gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \
1187 ../win/gnome/gnaskstr.h ../win/gnome/gnyesno.h
1188 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnbind.c
1189 $(O)gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h $(INCL)/tile2x11.h
1190 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnglyph.c
1191 $(O)gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \
1192 ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \
1194 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmain.c
1195 $(O)gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \
1196 ../win/gnome/gnsignal.h $(HACK_H)
1197 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmap.c
1198 $(O)gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \
1199 ../win/gnome/gnbind.h
1200 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmenu.c
1201 $(O)gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h
1202 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmesg.c
1203 $(O)gnopts.o: ../win/gnome/gnopts.c ../win/gnome/gnopts.h ../win/gnome/gnglyph.h \
1204 ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H)
1205 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnopts.c
1206 $(O)gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \
1207 ../win/gnome/gnmain.h $(HACK_H)
1208 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnplayer.c
1209 $(O)gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \
1210 ../win/gnome/gnmain.h
1211 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnsignal.c
1212 $(O)gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h \
1213 ../win/gnome/gnsignal.h ../win/gnome/gn_xpms.h \
1214 ../win/gnome/gnomeprv.h
1215 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnstatus.c
1216 $(O)gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \
1217 ../win/gnome/gn_rip.h
1218 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gntext.c
1219 $(O)gnworn.o: ../win/gnome/gnworn.c ../win/gnome/gnworn.h ../win/gnome/gnglyph.h \
1220 ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h
1221 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnworn.c
1222 $(O)gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h
1223 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnyesno.c
1224 $(O)wingem.o: ../win/gem/wingem.c $(HACK_H) $(INCL)/func_tab.h $(INCL)/dlb.h \
1225 $(INCL)/patchlevel.h $(INCL)/wingem.h
1226 $(cc) $(CFLAGS) -o$@ ../win/gem/wingem.c
1227 $(O)wingem1.o: ../win/gem/wingem1.c $(INCL)/gem_rsc.h $(INCL)/load_img.h \
1228 $(INCL)/gr_rect.h $(INCL)/wintype.h $(INCL)/wingem.h
1229 $(cc) $(CFLAGS) -o$@ ../win/gem/wingem1.c
1230 $(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h
1231 $(cc) $(CFLAGS) -o$@ ../win/gem/load_img.c
1232 $(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h
1233 $(cc) $(CFLAGS) -o$@ ../win/gem/gr_rect.c
1234 $(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \
1235 $(INCL)/dlb.h $(INCL)/patchlevel.h $(INCL)/tile2x11.h \
1236 $(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \
1237 $(INCL)/qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc
1238 $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_win.cpp
1239 $(O)qt_clust.o: ../win/Qt/qt_clust.cpp $(INCL)/qt_clust.h
1240 $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_clust.cpp
1241 $(O)qttableview.o: ../win/Qt/qttableview.cpp $(INCL)/qttableview.h
1242 $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qttableview.cpp
1243 $(O)monstr.o: monstr.c $(CONFIG_H)
1244 $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h
1245 $(O)allmain.o: allmain.c $(HACK_H)
1246 $(O)alloc.o: alloc.c $(CONFIG_H)
1247 $(O)apply.o: apply.c $(HACK_H)
1248 $(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h
1249 $(O)attrib.o: attrib.c $(HACK_H)
1250 $(O)ball.o: ball.c $(HACK_H)
1251 $(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h
1252 $(O)botl.o: botl.c $(HACK_H)
1253 $(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h
1254 $(O)dbridge.o: dbridge.c $(HACK_H)
1255 $(O)decl.o: decl.c $(HACK_H)
1256 $(O)detect.o: detect.c $(HACK_H) $(INCL)/artifact.h
1257 $(O)dig.o: dig.c $(HACK_H)
1258 $(O)display.o: display.c $(HACK_H)
1259 $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h
1260 $(O)do.o: do.c $(HACK_H) $(INCL)/lev.h
1261 $(O)do_name.o: do_name.c $(HACK_H)
1262 $(O)do_wear.o: do_wear.c $(HACK_H)
1263 $(O)dog.o: dog.c $(HACK_H)
1264 $(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h
1265 $(O)dokick.o: dokick.c $(HACK_H)
1266 $(O)dothrow.o: dothrow.c $(HACK_H)
1267 $(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h
1268 $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h
1269 $(O)eat.o: eat.c $(HACK_H)
1270 $(O)end.o: end.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h
1271 $(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h
1272 $(O)exper.o: exper.c $(HACK_H)
1273 $(O)explode.o: explode.c $(HACK_H)
1274 $(O)extralev.o: extralev.c $(HACK_H)
1275 $(O)files.o: files.c $(HACK_H) $(INCL)/dlb.h
1276 $(O)fountain.o: fountain.c $(HACK_H)
1277 $(O)hack.o: hack.c $(HACK_H)
1278 $(O)hacklib.o: hacklib.c $(HACK_H)
1279 $(O)invent.o: invent.c $(HACK_H)
1280 $(O)light.o: light.c $(HACK_H) $(INCL)/lev.h
1281 $(O)lock.o: lock.c $(HACK_H)
1282 $(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h
1283 $(O)makemon.o: makemon.c $(HACK_H)
1284 $(O)mapglyph.o: mapglyph.c $(HACK_H)
1285 $(O)mcastu.o: mcastu.c $(HACK_H)
1286 $(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h
1287 $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h
1288 $(O)minion.o: minion.c $(HACK_H)
1289 $(O)mklev.o: mklev.c $(HACK_H)
1290 $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h
1291 $(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h
1292 $(O)mkobj.o: mkobj.c $(HACK_H)
1293 $(O)mkroom.o: mkroom.c $(HACK_H)
1294 $(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h
1295 $(O)mondata.o: mondata.c $(HACK_H)
1296 $(O)monmove.o: monmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h
1297 $(O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \
1298 $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \
1300 $(O)mplayer.o: mplayer.c $(HACK_H)
1301 $(O)mthrowu.o: mthrowu.c $(HACK_H)
1302 $(O)muse.o: muse.c $(HACK_H)
1303 $(O)music.o: music.c $(HACK_H) #interp.c
1304 $(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h
1305 $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
1306 $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h
1307 $(O)objnam.o: objnam.c $(HACK_H)
1308 $(O)options.o: options.c $(CONFIG_H) $(INCL)/objclass.h $(INCL)/flag.h \
1309 $(HACK_H) $(INCL)/tcap.h
1310 $(O)pager.o: pager.c $(HACK_H) $(INCL)/dlb.h
1311 $(O)pickup.o: pickup.c $(HACK_H)
1312 $(O)pline.o: pline.c $(HACK_H)
1313 $(O)polyself.o: polyself.c $(HACK_H)
1314 $(O)potion.o: potion.c $(HACK_H)
1315 $(O)pray.o: pray.c $(HACK_H)
1316 $(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h
1317 $(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h
1318 $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h
1319 $(O)read.o: read.c $(HACK_H)
1320 $(O)rect.o: rect.c $(HACK_H)
1321 $(O)region.o: region.c $(HACK_H) $(INCL)/lev.h
1322 $(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h
1323 $(O)rip.o: rip.c $(HACK_H)
1324 $(O)rnd.o: rnd.c $(HACK_H)
1325 $(O)role.o: role.c $(HACK_H)
1326 $(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h
1327 $(O)save.o: save.c $(HACK_H) $(INCL)/lev.h
1328 $(O)shk.o: shk.c $(HACK_H)
1329 $(O)shknam.o: shknam.c $(HACK_H)
1330 $(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h
1331 $(O)sounds.o: sounds.c $(HACK_H)
1332 $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h
1333 $(O)spell.o: spell.c $(HACK_H)
1334 $(O)steal.o: steal.c $(HACK_H)
1335 $(O)steed.o: steed.c $(HACK_H)
1336 $(O)sys.o: sys.c $(HACK_H)
1337 $(O)teleport.o: teleport.c $(HACK_H)
1338 $(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h
1339 $(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(INCL)/patchlevel.h
1340 $(O)track.o: track.c $(HACK_H)
1341 $(O)trap.o: trap.c $(HACK_H)
1342 $(O)u_init.o: u_init.c $(HACK_H)
1343 $(O)uhitm.o: uhitm.c $(HACK_H)
1344 $(O)vault.o: vault.c $(HACK_H)
1345 $(O)version.o: version.c $(HACK_H) $(INCL)/date.h $(INCL)/patchlevel.h
1346 $(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h
1347 $(O)weapon.o: weapon.c $(HACK_H)
1348 $(O)were.o: were.c $(HACK_H)
1349 $(O)wield.o: wield.c $(HACK_H)
1350 $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h
1351 $(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h
1352 $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h
1353 $(O)worn.o: worn.c $(HACK_H)
1354 $(O)write.o: write.c $(HACK_H)
1355 $(O)zap.o: zap.c $(HACK_H)