1 # SCCS Id: @(#)Makefile.gcc 3.4 $Date: 2003/11/16 04:50:57 $
2 # Copyright (c) NetHack PC Development Team 1993-2003
4 # NetHack 3.4.x Makefile for MinGW
6 # Win32 Compilers Tested:
7 # - MinGW 1.0 (gcc version 2.95.3-6) (Console NetHack only)
8 # - MinGW 2.0 (gcc version 3.2)
10 # If you don't have this compiler, you can get it at:
11 # http://www.mingw.org/
13 # This is used for building two versions of NetHack:
14 # A tty port utilizing the Win32 Console I/O subsystem, Console
16 # A Win32 native port built on the Windows API, Graphical NetHack or
19 # In addition to your C compiler,
21 # if you want to change you will need a
22 # files with suffix workalike for
23 # .y yacc (such as bison)
24 # .l lex (such as flex)
27 # If you have any questions read the sys/winnt/Install.nt file included
28 # with the distribution.
32 #==============================================================================
34 # Set to Y for a graphical version
35 # Set to anything else (or undefine) for a tty version
40 # Set to Y for Debug support (to produce debug information)
41 # Set to anything else (or undefine) for a "release" version
42 # You can set your debug options below.
50 cflags = -mms-bitfields
61 # Set the gamedir according to your preference.
62 # If not present prior to compilation it gets created.
64 ifeq "$(GRAPHICAL)" "Y"
75 # Source directories. Makedefs hardcodes these, don't change them.
78 # NetHack include files
82 # NetHack documentation files
90 # NT Win32 specific files
92 # window port files (tty)
94 # window port files (Win32)
107 #==========================================
109 #==========================================
111 # Yacc/Lex ... if you got 'em.
113 # If you have yacc and lex programs (or work-alike such as bison
114 # and flex), comment out the upper two macros and uncomment
123 # - Specify your yacc and lex programs (or work-alikes) here.
133 # - Specify your flex skeleton file (if needed).
137 #FLEXSKEL = -S../tools/flex.ske
144 # Optional high-quality BSD random number generation routines
145 # (see pcconf.h). Set to nothing if not used.
148 RANDOM = $(OBJ)/random.o
151 #===============================================
152 #======= End of Modification Section ===========
153 #===============================================
154 ################################################
156 # Nothing below here should have to be changed.#
158 ################################################
160 ifeq "$(GRAPHICAL)" "Y"
161 WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \
162 $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
163 $(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
164 $(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
165 WINPFLAG = -DTILES -DMSWIN_GRAPHICS -D_WIN32_IE=0x0400
168 WINPHDR = $(WIN32)/mhaskyn.h $(WIN32)/mhdlg.h $(WIN32)/mhfont.h \
169 $(WIN32)/mhinput.h $(WIN32)/mhmain.h $(WIN32)/mhmap.h \
170 $(WIN32)/mhmenu.h $(WIN32)/mhmsg.h $(WIN32)/mhmsgwnd.h \
171 $(WIN32)/mhrip.h $(WIN32)/mhstatus.h \
172 $(WIN32)/mhtext.h $(WIN32)/resource.h $(WIN32)/winMS.h
173 WINPLIBS = -lcomctl32 -lwinmm
175 WINPORT = $(O)nttty.o
178 NHRES = $(O)console.o
183 TILEUTIL16 = $(UTIL)/tile2bmp.exe
184 TILEBMP16 = $(SRC)/tiles.bmp
186 TILEUTIL32 = $(UTIL)/til2bm32.exe
187 TILEBMP32 = $(SRC)/tiles32.bmp
189 SOUND = $(OBJ)/ntsound.o
193 # To store all the level files,
194 # help files, etc. in a single library file.
195 # USE_DLB = Y is left uncommented
199 ifeq "$(USE_DLB)" "Y"
205 #==========================================
206 # Setting up the compiler and linker
207 # macros. All builds include the base ones.
208 #==========================================
210 CFLAGSBASE = -c $(cflags) -I$(INCL) $(WINPINC) $(cdebug)
211 LFLAGSBASEC = $(linkdebug)
212 LFLAGSBASEG = $(linkdebug) -mwindows
214 #==========================================
216 #==========================================
218 CFLAGSU = $(CFLAGSBASE) $(WINPFLAG)
219 LFLAGSU = $(LFLAGSBASEC)
221 #==========================================
223 #==========================================
225 CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
226 lflags = $(LFLAGSBASE)
227 ifeq "$(GRAPHICAL)" "Y"
228 lflags = $(LFLAGSBASEG)
230 lflags = $(LFLAGSBASEC)
233 GAMEFILE = $(GAMEDIR)/$(GAME).exe # whole thing
235 ifeq "$(USE_DLB)" "Y"
241 #==========================================
242 #================ RULES ==================
243 #==========================================
245 .SUFFIXES: .exe .o .til .uu .c .y .l
247 #==========================================
248 # Rules for files in src
249 #==========================================
252 $(cc) $(CFLAGS) -o$@ $<
254 $(OBJ)/%.o : $(SRC)/%.c
255 $(cc) $(CFLAGS) -o$@ $<
257 #==========================================
258 # Rules for files in sys/share
259 #==========================================
261 $(OBJ)/%.o : $(SSYS)/%.c
262 $(cc) $(CFLAGS) -o$@ $<
264 #==========================================
265 # Rules for files in sys/winnt
266 #==========================================
268 $(OBJ)/%.o : $(NTSYS)/%.c
269 $(cc) $(CFLAGS) -o$@ $<
271 $(INCL)/%.h : $(NTSYS)/%.h
274 #==========================================
275 # Rules for files in util
276 #==========================================
278 $(OBJ)/%.o : $(UTIL)/%.c
279 $(cc) $(CFLAGSU) -o$@ $<
281 #==========================================
282 # Rules for files in win/share
283 #==========================================
285 $(OBJ)/%.o : $(WSHR)/%.c
286 $(cc) $(CFLAGS) -o$@ $<
288 $(INCL)/%.h : $(WSHR)/%.h
291 #{$(WSHR)}.txt{$(DAT)}.txt:
294 #==========================================
295 # Rules for files in win/tty
296 #==========================================
298 $(OBJ)/%.o : $(TTY)/%.c
299 $(cc) $(CFLAGS) -o$@ $<
301 #==========================================
302 # Rules for files in win/win32
303 #==========================================
305 $(OBJ)/%.o : $(WIN32)/%.c
306 $(cc) $(CFLAGS) -o$@ $<
308 #==========================================
309 #================ MACROS ==================
310 #==========================================
311 # This section creates shorthand macros for many objects
312 # referenced later on in the Makefile.
315 DEFFILE = $(NTSYS)/$(GAME).def
318 # Shorten up the location for some files
329 MAKESRC = $(U)makedefs.c
331 SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c
333 DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c
335 MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o
337 SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \
338 $(O)alloc.o $(O)decl.o $(O)drawing.o \
339 $(O)monst.o $(O)objects.o $(O)panic.o
341 DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \
342 $(O)alloc.o $(O)panic.o
344 RECOVOBJS = $(O)recover.o
346 TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt
349 # These are not invoked during a normal game build in 3.4
351 TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \
352 $(O)decl.o $(O)monst.o $(O)objects.o
354 TEXT_IO32 = $(O)tilete32.o $(O)tiletx32.o $(O)drawing.o \
355 $(O)decl.o $(O)monst.o $(O)objects.o
357 GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o
358 GIFREADERS32 = $(O)gifrd32.o $(O)alloc.o $(O)panic.o
360 PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o
363 # Object files for the game itself.
366 VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o
367 VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
368 VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
369 VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o
370 VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o
371 VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
372 VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
373 VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
374 VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o
375 VOBJ10 = $(O)mail.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o
376 VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)minion.o $(O)mklev.o
377 VOBJ12 = $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o $(O)mkroom.o
378 VOBJ13 = $(O)mon.o $(O)mondata.o $(O)monmove.o $(O)monst.o
379 VOBJ14 = $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o
380 VOBJ15 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o
381 VOBJ16 = $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o
382 VOBJ17 = $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o
383 VOBJ18 = $(O)quest.o $(O)questpgr.o $(RANDOM) $(O)read.o
384 VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o
385 VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o
386 VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o
387 VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o
388 VOBJ23 = $(O)teleport.o $(O)timeout.o $(O)topten.o $(O)track.o
389 VOBJ24 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o
390 VOBJ25 = $(O)vis_tab.o $(O)vision.o $(O)weapon.o $(O)were.o
391 VOBJ26 = $(O)wield.o $(O)windows.o $(O)wizard.o $(O)worm.o
392 VOBJ27 = $(O)worn.o $(O)write.o $(O)zap.o
396 TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o
398 SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \
399 $(SOUND) $(O)pcmain.o $(O)mapimail.o $(O)nhlan.o
401 OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
402 $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
403 $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
404 $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
405 $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
410 VVOBJ = $(O)version.o
412 ALLOBJ = $(WINPOBJ) $(SOBJ) $(DLBOBJ) $(TTYOBJ) $(WOBJ) $(OBJS) $(VVOBJ)
414 ifeq "$(GRAPHICAL)" "Y"
415 OPTIONS_FILE = $(DAT)/guioptions
417 OPTIONS_FILE = $(DAT)/ttyoptions
420 #==========================================
422 #==========================================
424 CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \
425 $(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \
426 $(INCL)/system.h $(INCL)/unixconf.h $(INCL)/os2conf.h \
427 $(INCL)/micro.h $(INCL)/pcconf.h $(INCL)/tosconf.h \
428 $(INCL)/amiconf.h $(INCL)/macconf.h $(INCL)/beconf.h \
429 $(INCL)/ntconf.h $(INCL)/nhlan.h
431 HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h \
432 $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \
433 $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \
434 $(INCL)/permonst.h $(INCL)/monattk.h \
435 $(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \
436 $(INCL)/wintype.h $(INCL)/decl.h $(INCL)/quest.h \
437 $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \
438 $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h \
439 $(INCL)/skills.h $(INCL)/onames.h $(INCL)/timeout.h \
440 $(INCL)/trap.h $(INCL)/flag.h $(INCL)/rm.h \
441 $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \
442 $(INCL)/rect.h $(INCL)/region.h $(INCL)/winprocs.h \
443 $(INCL)/wintty.h $(INCL)/trampoli.h
445 LEV_H = $(INCL)/lev.h
446 DGN_FILE_H = $(INCL)/dgn_file.h
447 LEV_COMP_H = $(INCL)/lev_comp.h
448 SP_LEV_H = $(INCL)/sp_lev.h
449 TILE_H = ../win/share/tile.h
451 #==========================================
453 #==========================================
455 DATABASE = $(DAT)/data.base
458 # The name of the game.
461 GAMEFILE = $(GAMEDIR)/$(GAME).exe
464 #==========================================
465 #=============== TARGETS ==================
466 #==========================================
468 # Since DOS doesn't allow / as path separator, and GCC doesn't allow \ as
469 # path separator, we must change all pathnames when performing DOS commands.
470 # This is done by blindly applying $(subst /,\, ...) on every command.
471 # Where any command contain / for another reason (switch char, or echoing
472 # comment lines to lev/dungeon files) a little more care is taken.
475 # The default make target (so just typing 'nmake' is useful).
477 default : $(GAMEFILE)
483 $(GAME) : $(O)obj.tag $(O)utility.tag graphicschk $(GAMEFILE)
484 @echo $(GAME) is up to date.
492 install: graphicschk $(GAME) $(O)install.tag
496 $(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \
497 $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag $(DLB)
498 ifeq "$(USE_DLB)" "Y"
499 $(subst /,\,copy nhdat $(GAMEDIR))
500 $(subst /,\,copy $(DAT)/license $(GAMEDIR))
501 $(subst /,\,copy $(DAT)/opthelp $(GAMEDIR))
503 $(subst /,\,copy $(DAT)/*. $(GAMEDIR))
504 $(subst /,\,copy $(DAT)/*.dat $(GAMEDIR))
505 $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR))
506 $(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile)
508 $(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt)
509 $(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt)
510 $(subst /,\,copy $(NTSYS)/defaults.nh $(GAMEDIR)/defaults.nh)
511 $(subst /,\,echo install done > $@)
513 # copy $(NTSYS)/winnt.hlp $(GAMEDIR)
515 recover: $(U)recover.exe
516 $(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR))
517 $(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)/recover.txt)
519 $(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \
520 $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \
521 $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \
522 $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \
523 $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \
524 $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \
525 $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/sokoban.des \
526 $(DAT)/tourist.des $(DAT)/valkyrie.des $(DAT)/wizard.des
527 $(subst /,\,$(U)lev_comp $(DAT)/bigroom.des)
528 $(subst /,\,$(U)lev_comp $(DAT)/castle.des)
529 $(subst /,\,$(U)lev_comp $(DAT)/endgame.des)
530 $(subst /,\,$(U)lev_comp $(DAT)/gehennom.des)
531 $(subst /,\,$(U)lev_comp $(DAT)/knox.des)
532 $(subst /,\,$(U)lev_comp $(DAT)/mines.des)
533 $(subst /,\,$(U)lev_comp $(DAT)/medusa.des)
534 $(subst /,\,$(U)lev_comp $(DAT)/oracle.des)
535 $(subst /,\,$(U)lev_comp $(DAT)/sokoban.des)
536 $(subst /,\,$(U)lev_comp $(DAT)/tower.des)
537 $(subst /,\,$(U)lev_comp $(DAT)/yendor.des)
538 $(subst /,\,$(U)lev_comp $(DAT)/arch.des)
539 $(subst /,\,$(U)lev_comp $(DAT)/barb.des)
540 $(subst /,\,$(U)lev_comp $(DAT)/caveman.des)
541 $(subst /,\,$(U)lev_comp $(DAT)/healer.des)
542 $(subst /,\,$(U)lev_comp $(DAT)/knight.des)
543 $(subst /,\,$(U)lev_comp $(DAT)/monk.des)
544 $(subst /,\,$(U)lev_comp $(DAT)/priest.des)
545 $(subst /,\,$(U)lev_comp $(DAT)/ranger.des)
546 $(subst /,\,$(U)lev_comp $(DAT)/rogue.des)
547 $(subst /,\,$(U)lev_comp $(DAT)/samurai.des)
548 $(subst /,\,$(U)lev_comp $(DAT)/tourist.des)
549 $(subst /,\,$(U)lev_comp $(DAT)/valkyrie.des)
550 $(subst /,\,$(U)lev_comp $(DAT)/wizard.des)
551 $(subst /,\,copy *.lev $(DAT))
552 $(subst /,\,del *.lev)
553 $(subst /,\,echo sp_levs done > $(O)sp_lev.tag)
555 $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \
556 $(SRC)/monstr.c $(SRC)/vis_tab.c $(U)lev_comp.exe $(INCL)/vis_tab.h \
557 $(U)dgn_comp.exe $(TILEUTIL16)
558 $(subst /,\,@echo utilities made >$@)
559 @echo utilities made.
561 tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
562 @echo Optional tile development utilities are up to date.
564 ifeq "$(GRAPHICAL)" "Y"
565 $(NHRES): $(TILEBMP16) $(WIN32)/winhack.rc $(WIN32)/mnsel.bmp \
566 $(WIN32)/mnselcnt.bmp $(WIN32)/mnunsel.bmp \
567 $(WIN32)/petmark.bmp $(WIN32)/NetHack.ico $(WIN32)/rip.bmp \
569 @$(rc) -o$@ --include-dir $(WIN32) -i $(WIN32)/winhack.rc
571 $(NHRES): $(NTSYS)/console.rc $(NTSYS)/NetHack.ico
572 @$(rc) -o$@ --include-dir $(NTSYS) -i $(NTSYS)/console.rc
575 #==========================================
577 #==========================================
579 $(subst /,\,@if not exist $(GAMEDIR)/*.* echo creating directory $(GAMEDIR))
580 $(subst /,\,@if not exist $(GAMEDIR)/*.* mkdir $(GAMEDIR))
581 $(subst /,\,@echo directory created > $@)
583 ifeq "$(GRAPHICAL)" "Y"
584 $(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag
586 $(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag \
587 $(GAMEDIR)/nhdefkey.dll $(GAMEDIR)/nh340key.dll $(GAMEDIR)/nhraykey.dll
590 @$(link) $(lflags) -o$@ $(ALLOBJ) $(NHRES) $(WINPLIBS)
591 $(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
595 $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(NTSYS)/nhdefkey.c
597 $(GAMEDIR)/nhdefkey.dll : $(O)nhdefkey.o $(O)gamedir.tag
599 $(cc) -shared -Wl,--export-all-symbols \
600 -Wl,--add-stdcall-alias -o $@ $<
603 $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(NTSYS)/nh340key.c
605 $(GAMEDIR)/nh340key.dll : $(O)nh340key.o $(O)gamedir.tag
607 $(cc) -shared -Wl,--export-all-symbols \
608 -Wl,--add-stdcall-alias -o $@ $<
611 $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(NTSYS)/nhraykey.c
613 $(GAMEDIR)/nhraykey.dll : $(O)nhraykey.o $(O)gamedir.tag
615 $(cc) -shared -Wl,--export-all-symbols \
616 -Wl,--add-stdcall-alias -o $@ $<
618 $(GAME)_.ico : $(NTSYS)/$(GAME).ico
619 $(subst /,\,@copy $(NTSYS)/$(GAME).ico $@)
621 #==========================================
622 # Create directory for holding object files
623 #==========================================
626 ifeq "$(GRAPHICAL)" "Y"
628 @echo NOTE: This build will include tile support.
631 $(subst /,\,@echo graphicschk > graphicschk)
637 #==========================================
639 #==========================================
641 $(U)makedefs.exe: $(MAKEOBJS)
642 @$(link) $(LFLAGSU) -o$@ $(MAKEOBJS)
644 $(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \
645 $(INCL)/objclass.h $(INCL)/monsym.h $(INCL)/qtext.h \
646 $(INCL)/patchlevel.h $(U)makedefs.c $(O)obj.tag
647 $(cc) $(CFLAGSU) -o$@ $(U)makedefs.c
650 # date.h should be remade every time any of the source or include
654 $(INCL)/date.h $(OPTIONS_FILE): $(U)makedefs.exe
655 $(subst /,\,$(U)makedefs -v)
657 #$(OPTIONS_FILE): $(U)makedefs.exe
658 # $(subst /,\,$(U)makedefs -v)
660 $(INCL)/onames.h : $(U)makedefs.exe
661 $(subst /,\,$(U)makedefs -o)
663 $(INCL)/pm.h : $(U)makedefs.exe
664 $(subst /,\,$(U)makedefs -p)
666 #$(INCL)/trap.h : $(U)makedefs.exe
669 $(SRC)/monstr.c: $(U)makedefs.exe
670 $(subst /,\,$(U)makedefs -m)
672 $(INCL)/vis_tab.h: $(U)makedefs.exe
673 $(subst /,\,$(U)makedefs -z)
675 $(SRC)/vis_tab.c: $(U)makedefs.exe
676 $(subst /,\,$(U)makedefs -z)
678 #==========================================
679 # uudecode utility and uuencoded targets
680 #==========================================
682 $(U)uudecode.exe: $(O)uudecode.o
683 @$(link) $(LFLAGSU) -o$@ $(O)uudecode.o
685 $(O)uudecode.o: $(SSYS)/uudecode.c
687 $(NTSYS)/NetHack.ico : $(U)uudecode.exe $(NTSYS)/nhico.uu
688 $(subst /,\,$(U)uudecode.exe $(NTSYS)/nhico.uu)
689 $(subst /,\,copy NetHack.ico $@)
692 $(WIN32)/NetHack.ico : $(NTSYS)/NetHack.ico
693 $(subst /,\,copy $< $@)
695 $(WIN32)/mnsel.bmp: $(U)uudecode.exe $(WIN32)/mnsel.uu
696 $(subst /,\,$(U)uudecode.exe $(WIN32)/mnsel.uu)
697 $(subst /,\,copy mnsel.bmp $@)
700 $(WIN32)/mnselcnt.bmp: $(U)uudecode.exe $(WIN32)/mnselcnt.uu
701 $(subst /,\,$(U)uudecode.exe $(WIN32)/mnselcnt.uu)
702 $(subst /,\,copy mnselcnt.bmp $@)
705 $(WIN32)/mnunsel.bmp: $(U)uudecode.exe $(WIN32)/mnunsel.uu
706 $(subst /,\,$(U)uudecode.exe $(WIN32)/mnunsel.uu)
707 $(subst /,\,copy mnunsel.bmp $@)
710 $(WIN32)/petmark.bmp: $(U)uudecode.exe $(WIN32)/petmark.uu
711 $(subst /,\,$(U)uudecode.exe $(WIN32)/petmark.uu)
712 $(subst /,\,copy petmark.bmp $@)
715 $(WIN32)/rip.bmp: $(U)uudecode.exe $(WIN32)/rip.uu
716 $(subst /,\,$(U)uudecode.exe $(WIN32)/rip.uu)
717 $(subst /,\,copy rip.bmp $@)
720 $(WIN32)/splash.bmp: $(U)uudecode.exe $(WIN32)/splash.uu
721 $(subst /,\,$(U)uudecode.exe $(WIN32)/splash.uu)
722 $(subst /,\,copy splash.bmp $@)
726 #==========================================
727 # Level Compiler Stuff
728 #==========================================
730 LEVCFLAGS=$(cflags) -c -DWIN32 -D_WIN32 -I../include $(cdebug) -DDLB
732 $(U)lev_comp.exe: $(SPLEVOBJS)
734 @$(link) $(LFLAGSU) -o$@ $(SPLEVOBJS)
736 $(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c
737 $(cc) $(LEVCFLAGS) -o$@ $(U)lev_yacc.c
739 $(O)lev_$(LEX).o: $(HACK_H) $(INCL)/lev_comp.h $(SP_LEV_H) \
741 $(cc) $(LEVCFLAGS) -o$@ $(U)lev_$(LEX).c
743 $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
744 $(cc) $(LEVCFLAGS) -o$@ $(U)lev_main.c
747 $(U)lev_yacc.c $(INCL)/lev_comp.h : $(U)lev_comp.y
748 ifeq "$(DO_YACC)" "YACC_ACT"
749 $(subst /,\,$(YACC) -d $(U)lev_comp.y)
750 $(subst /,\,copy $(YTABC) $(U)lev_yacc.c)
751 $(subst /,\,copy $(YTABH) $(INCL)/lev_comp.h)
752 $(subst /,\,@del $(YTABC))
753 $(subst /,\,@del $(YTABH))
756 @echo $(U)lev_comp.y has changed.
757 @echo To update $(U)lev_yacc.c and $(INCL)/lev_comp.h run $(YACC).
759 @echo For now, we will copy the prebuilt lev_yacc.c and
760 @echo lev_comp.h from $(SSYS) into $(UTIL) and use them.
761 $(subst /,\,@copy $(SSYS)/lev_yacc.c $(U)lev_yacc.c >nul)
762 $(subst /,\,@copy $(SSYS)/lev_comp.h $(INCL)/lev_comp.h >nul)
763 $(subst /,\,echo.>>$(U)lev_yacc.c)
764 $(subst /,\,echo.>>$(INCL)/lev_comp.h)
767 $(U)lev_$(LEX).c: $(U)lev_comp.l
768 ifeq "$(DO_LEX)" "LEX_ACT"
769 $(subst /,\,$(LEX) $(FLEXSKEL) $(U)lev_comp.l)
770 $(subst /,\,copy $(LEXYYC) $@)
771 $(subst /,\,@del $(LEXYYC))
773 @echo $(U)lev_comp.l has changed. To update $@ run $(LEX).
775 @echo For now, we will copy the prebuilt lev_lex.c
776 @echo from $(SSYS) into $(UTIL) and use it.
777 $(subst /,\,@copy $(SSYS)/lev_lex.c $@ >nul)
778 $(subst /,\,echo.>>$@)
781 #==========================================
782 # Dungeon Compiler Stuff
783 #==========================================
785 $(U)dgn_comp.exe: $(DGNCOMPOBJS)
787 @$(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
790 $(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)/dgn_comp.h $(U)dgn_yacc.c
791 $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_yacc.c
793 $(O)dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)/dgn_comp.h \
795 $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_$(LEX).c
797 $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
798 $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_main.c
800 $(U)dgn_yacc.c $(INCL)/dgn_comp.h : $(U)dgn_comp.y
801 ifeq "$(DO_YACC)" "YACC_ACT"
802 $(subst /,\,$(YACC) -d $(U)dgn_comp.y)
803 $(subst /,\,copy $(YTABC) $(U)dgn_yacc.c)
804 $(subst /,\,copy $(YTABH) $(INCL)/dgn_comp.h)
805 $(subst /,\,@del $(YTABC))
806 $(subst /,\,@del $(YTABH))
808 @echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and
809 @echo $(INCL)/dgn_comp.h run $(YACC).
811 @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and
812 @echo dgn_comp.h from $(SSYS) into $(UTIL) and use them.
813 $(subst /,\,@copy $(SSYS)/dgn_yacc.c $(U)dgn_yacc.c >nul)
814 $(subst /,\,@copy $(SSYS)/dgn_comp.h $(INCL)/dgn_comp.h >nul)
815 $(subst /,\,echo.>>$(U)dgn_yacc.c)
816 $(subst /,\,echo.>>$(INCL)/dgn_comp.h)
819 $(U)dgn_$(LEX).c: $(U)dgn_comp.l
820 ifeq "$(DO_LEX)" "LEX_ACT"
821 $(subst /,\,$(LEX) $(FLEXSKEL) $(U)dgn_comp.l)
822 $(subst /,\,copy $(LEXYYC) $@)
823 $(subst /,\,@del $(LEXYYC))
825 @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX).
827 @echo For now, we will copy the prebuilt dgn_lex.c
828 @echo from $(SSYS) into $(UTIL) and use it.
829 $(subst /,\,@copy $(SSYS)/dgn_lex.c $@ >nul)
830 $(subst /,\,echo.>>$@)
833 #==========================================
834 # Create directory for holding object files
835 #==========================================
838 $(subst /,\,@if not exist $(OBJ)/*.* echo creating directory $(OBJ))
839 $(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ))
840 $(subst /,\,@echo directory created > $@)
843 #==========================================
844 #=========== SECONDARY TARGETS ============
845 #==========================================
847 #===========================================
848 # Header files NOT distributed in ../include
849 #===========================================
851 $(INCL)/win32api.h: $(NTSYS)/win32api.h
852 $(subst /,\,copy $(NTSYS)/win32api.h $@)
855 #==========================================
856 # DLB utility and nhdat file creation
857 #==========================================
859 $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
860 @$(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
863 $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h
864 $(cc) $(CFLAGS) -o$@ $(SRC)/dlb.c
866 $(O)dlb_main.o: $(UTIL)/dlb_main.c $(INCL)/config.h $(INCL)/dlb.h
867 $(cc) $(CFLAGS) -o$@ $(UTIL)/dlb_main.c
869 $(DAT)/porthelp: $(NTSYS)/porthelp
870 $(subst /,\,@copy $(NTSYS)/porthelp $@ >nul)
872 nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \
873 $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp \
874 $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp $(DAT)/dungeon \
875 $(DAT)/porthelp $(DAT)/license $(O)sp_lev.tag
876 $(subst /,\,echo data >$(DAT)/dlb.lst)
877 $(subst /,\,echo oracles >>$(DAT)/dlb.lst)
878 $(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst)
879 $(subst /,\,if exist $(DAT)/ttyoptions echo ttyoptions >>$(DAT)/dlb.lst)
880 $(subst /,\,if exist $(DAT)/guioptions echo guioptions >>$(DAT)/dlb.lst)
881 $(subst /,\,if exist $(DAT)/porthelp echo porthelp >>$(DAT)/dlb.lst)
882 $(subst /,\,echo quest.dat >>$(DAT)/dlb.lst)
883 $(subst /,\,echo rumors >>$(DAT)/dlb.lst)
884 $(subst /,\,echo help >>$(DAT)/dlb.lst)
885 $(subst /,\,echo hh >>$(DAT)/dlb.lst)
886 $(subst /,\,echo cmdhelp >>$(DAT)/dlb.lst)
887 $(subst /,\,echo history >>$(DAT)/dlb.lst)
888 $(subst /,\,echo opthelp >>$(DAT)/dlb.lst)
889 $(subst /,\,echo wizhelp >>$(DAT)/dlb.lst)
890 $(subst /,\,echo dungeon >>$(DAT)/dlb.lst)
891 $(subst /,\,echo license >>$(DAT)/dlb.lst)
892 dir /l /b /-p $(subst /,\,$(DAT)/*.lev >>$(DAT)/dlb.lst)
893 $(subst /,\,$(U)dlb_main CcIf $(DAT) dlb.lst $(SRC)/nhdat)
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 ifeq "$(GRAPHICAL)" "Y"
959 $(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
960 @echo Creating 16x16 binary tile files (this may take some time)
961 $(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))
970 $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
972 @$(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO)
974 $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
976 @$(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32)
978 $(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)/win32api.h
979 $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
981 $(O)til2bm32.o: $(WSHR)/til2bm32.c $(HACK_H) $(TILE_H) $(INCL)/win32api.h
982 $(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/til2bm32.c
984 #==========================================
986 #==========================================
989 $(subst /,\,if exist graphicschk del graphicschk)
990 $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h)
991 $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h)
992 $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h)
993 $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h)
994 $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c)
995 $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c)
996 $(subst /,\,if exist $(U)*.lnk del $(U)*.lnk)
997 $(subst /,\,if exist $(U)*.map del $(U)*.map)
998 $(subst /,\,if exist $(DAT)/data del $(DAT)/data)
999 $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
1000 $(subst /,\,if exist $(DAT)/???-fil?.lev del $(DAT)/???-fil?.lev)
1001 $(subst /,\,if exist $(DAT)/???-goal.lev del $(DAT)/???-goal.lev)
1002 $(subst /,\,if exist $(DAT)/???-loca.lev del $(DAT)/???-loca.lev)
1003 $(subst /,\,if exist $(DAT)/???-strt.lev del $(DAT)/???-strt.lev)
1004 $(subst /,\,if exist $(DAT)/air.lev del $(DAT)/air.lev)
1005 $(subst /,\,if exist $(DAT)/asmodeus.lev del $(DAT)/asmodeus.lev)
1006 $(subst /,\,if exist $(DAT)/astral.lev del $(DAT)/astral.lev)
1007 $(subst /,\,if exist $(DAT)/baalz.lev del $(DAT)/baalz.lev)
1008 $(subst /,\,if exist $(DAT)/bigrm-*.lev del $(DAT)/bigrm-*.lev)
1009 $(subst /,\,if exist $(DAT)/castle.lev del $(DAT)/castle.lev)
1010 $(subst /,\,if exist $(DAT)/data del $(DAT)/data)
1011 $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon)
1012 $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf)
1013 $(subst /,\,if exist $(DAT)/earth.lev del $(DAT)/earth.lev)
1014 $(subst /,\,if exist $(DAT)/fakewiz?.lev del $(DAT)/fakewiz?.lev)
1015 $(subst /,\,if exist $(DAT)/fire.lev del $(DAT)/fire.lev)
1016 $(subst /,\,if exist $(DAT)/juiblex.lev del $(DAT)/juiblex.lev)
1017 $(subst /,\,if exist $(DAT)/knox.lev del $(DAT)/knox.lev)
1018 $(subst /,\,if exist $(DAT)/medusa-?.lev del $(DAT)/medusa-?.lev)
1019 $(subst /,\,if exist $(DAT)/mine*.lev del $(DAT)/mine*.lev)
1020 $(subst /,\,if exist $(DAT)/options del $(DAT)/options)
1021 $(subst /,\,if exist $(DAT)/ttyoptions del $(DAT)/ttyoptions)
1022 $(subst /,\,if exist $(DAT)/guioptions del $(DAT)/guioptions)
1023 $(subst /,\,if exist $(DAT)/oracle.lev del $(DAT)/oracle.lev)
1024 $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles)
1025 $(subst /,\,if exist $(DAT)/orcus.lev del $(DAT)/orcus.lev)
1026 $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
1027 $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat)
1028 $(subst /,\,if exist $(DAT)/sanctum.lev del $(DAT)/sanctum.lev)
1029 $(subst /,\,if exist $(DAT)/soko?-?.lev del $(DAT)/soko?-?.lev)
1030 $(subst /,\,if exist $(DAT)/tower?.lev del $(DAT)/tower?.lev)
1031 $(subst /,\,if exist $(DAT)/valley.lev del $(DAT)/valley.lev)
1032 $(subst /,\,if exist $(DAT)/water.lev del $(DAT)/water.lev)
1033 $(subst /,\,if exist $(DAT)/wizard?.lev del $(DAT)/wizard?.lev)
1034 $(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag)
1035 $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c)
1036 $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c)
1037 $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe)
1038 $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst)
1039 $(subst /,\,if exist nhdat. del nhdat.)
1040 $(subst /,\,if exist $(O)install.tag del $(O)install.tag)
1041 $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag)
1042 $(subst /,\,if exist $(O)gamedir.tag del $(O)gamedir.tag)
1044 $(subst /,\,rmdir $(OBJ)) /s /Q
1048 $(subst /,\,if exist $(O)*.o del $(O)*.o)
1049 $(subst /,\,if exist $(O)utility.tag del $(O)utility.tag)
1050 $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe)
1051 $(subst /,\,if exist $(U)lev_comp.exe del $(U)lev_comp.exe)
1052 $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe)
1053 $(subst /,\,if exist $(SRC)/*.lnk del $(SRC)/*.lnk)
1054 $(subst /,\,if exist $(SRC)/*.map del $(SRC)/*.map)
1055 $(subst /,\,if exist $(TILEBMP16) del $(TILEBMP16))
1056 $(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32))
1058 #===================================================================
1059 # OTHER DEPENDENCIES
1060 #===================================================================
1066 $(DAT)/data: $(O)utility.tag $(DATABASE)
1067 $(subst /,\,$(U)makedefs -d)
1069 $(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal
1070 $(subst /,\,$(U)makedefs -r)
1072 $(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt
1073 $(subst /,\,$(U)makedefs -q)
1075 $(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt
1076 $(subst /,\,$(U)makedefs -h)
1078 $(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def
1079 $(subst /,\,$(U)makedefs -e)
1080 $(subst /,\,$(U)dgn_comp $(DAT)/dungeon.pdf)
1086 $(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)/win32api.h $(NTSYS)/nttty.c
1087 $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(NTSYS)/nttty.c
1088 $(O)winnt.o: $(HACK_H) $(INCL)/win32api.h $(NTSYS)/winnt.c
1089 $(cc) $(CFLAGS) -o$@ $(NTSYS)/winnt.c
1090 $(O)ntsound.o: $(HACK_H) $(NTSYS)/ntsound.c
1091 $(cc) $(CFLAGS) -o$@ $(NTSYS)/ntsound.c
1092 $(O)mapimail.o: $(HACK_H) $(INCL)/nhlan.h $(NTSYS)/mapimail.c
1093 $(cc) $(CFLAGS) -DMAPI_VERBOSE -o$@ $(NTSYS)/mapimail.c
1099 $(O)panic.o: $(U)panic.c $(CONFIG_H)
1100 $(cc) $(CFLAGS) -o$@ $(U)panic.c
1103 # The rest are stolen from sys/unix/Makefile.src,
1104 # with the following changes:
1105 # * ../include changed to $(INCL)
1106 # * -c (which is included in CFLAGS) substituted
1108 # * targets prefixed with $(O)
1109 # * $(CC) changed to $(cc)
1110 # but otherwise untouched.
1111 # That means that there is some irrelevant stuff
1112 # in here, but maintenance should be easier.
1114 $(O)tos.o: ../sys/atari/tos.c $(HACK_H) $(INCL)/tcap.h
1115 $(cc) $(CFLAGS) -o$@ ../sys/atari/tos.c
1116 $(O)pcmain.o: ../sys/share/pcmain.c $(HACK_H) $(INCL)/dlb.h \
1118 $(cc) $(CFLAGS) -o$@ ../sys/share/pcmain.c
1119 $(O)pcsys.o: ../sys/share/pcsys.c $(HACK_H)
1120 $(cc) $(CFLAGS) -o$@ ../sys/share/pcsys.c
1121 $(O)pctty.o: ../sys/share/pctty.c $(HACK_H)
1122 $(cc) $(CFLAGS) -o$@ ../sys/share/pctty.c
1123 $(O)pcunix.o: ../sys/share/pcunix.c $(HACK_H)
1124 $(cc) $(CFLAGS) -o$@ ../sys/share/pcunix.c
1125 $(O)random.o: ../sys/share/random.c $(HACK_H)
1126 $(cc) $(CFLAGS) -o$@ ../sys/share/random.c
1127 $(O)ioctl.o: ../sys/share/ioctl.c $(HACK_H) $(INCL)/tcap.h
1128 $(cc) $(CFLAGS) -o$@ ../sys/share/ioctl.c
1129 $(O)unixtty.o: ../sys/share/unixtty.c $(HACK_H)
1130 $(cc) $(CFLAGS) -o$@ ../sys/share/unixtty.c
1131 $(O)unixmain.o: ../sys/unix/unixmain.c $(HACK_H) $(INCL)/dlb.h
1132 $(cc) $(CFLAGS) -o$@ ../sys/unix/unixmain.c
1133 $(O)unixunix.o: ../sys/unix/unixunix.c $(HACK_H)
1134 $(cc) $(CFLAGS) -o$@ ../sys/unix/unixunix.c
1135 $(O)unixres.o: ../sys/unix/unixres.c $(CONFIG_H)
1136 $(cc) $(CFLAGS) -o$@ ../sys/unix/unixres.c
1137 $(O)bemain.o: ../sys/be/bemain.c $(HACK_H) $(INCL)/dlb.h
1138 $(cc) $(CFLAGS) -o$@ ../sys/be/bemain.c
1139 $(O)getline.o: ../win/tty/getline.c $(HACK_H) $(INCL)/func_tab.h
1140 $(cc) $(CFLAGS) -o$@ ../win/tty/getline.c
1141 $(O)termcap.o: ../win/tty/termcap.c $(HACK_H) $(INCL)/tcap.h
1142 $(cc) $(CFLAGS) -o$@ ../win/tty/termcap.c
1143 $(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h
1144 $(cc) $(CFLAGS) -o$@ ../win/tty/topl.c
1145 $(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \
1146 $(INCL)/patchlevel.h $(INCL)/tcap.h
1147 $(cc) $(CFLAGS) -o$@ ../win/tty/wintty.c
1148 $(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \
1150 $(cc) $(CFLAGS) -o$@ ../win/X11/Window.c
1151 $(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H)
1152 $(cc) $(CFLAGS) -o$@ ../win/X11/dialogs.c
1153 $(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \
1154 $(INCL)/patchlevel.h ../win/X11/nh72icon \
1155 ../win/X11/nh56icon ../win/X11/nh32icon
1156 $(cc) $(CFLAGS) -o$@ ../win/X11/winX.c
1157 $(O)winmap.o: ../win/X11/winmap.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/dlb.h \
1158 $(INCL)/winX.h $(INCL)/tile2x11.h
1159 $(cc) $(CFLAGS) -o$@ ../win/X11/winmap.c
1160 $(O)winmenu.o: ../win/X11/winmenu.c $(HACK_H) $(INCL)/winX.h
1161 $(cc) $(CFLAGS) -o$@ ../win/X11/winmenu.c
1162 $(O)winmesg.o: ../win/X11/winmesg.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/winX.h
1163 $(cc) $(CFLAGS) -o$@ ../win/X11/winmesg.c
1164 $(O)winmisc.o: ../win/X11/winmisc.c $(HACK_H) $(INCL)/func_tab.h \
1166 $(cc) $(CFLAGS) -o$@ ../win/X11/winmisc.c
1167 $(O)winstat.o: ../win/X11/winstat.c $(HACK_H) $(INCL)/winX.h
1168 $(cc) $(CFLAGS) -o$@ ../win/X11/winstat.c
1169 $(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h
1170 $(cc) $(CFLAGS) -o$@ ../win/X11/wintext.c
1171 $(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h
1172 $(cc) $(CFLAGS) -o$@ ../win/X11/winval.c
1173 $(O)tile.o: tile.c $(HACK_H)
1174 $(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \
1175 ../win/gnome/gnmain.h
1176 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c
1177 $(O)gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \
1178 ../win/gnome/gnaskstr.h ../win/gnome/gnyesno.h
1179 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnbind.c
1180 $(O)gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h $(INCL)/tile2x11.h
1181 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnglyph.c
1182 $(O)gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \
1183 ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \
1185 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmain.c
1186 $(O)gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \
1187 ../win/gnome/gnsignal.h $(HACK_H)
1188 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmap.c
1189 $(O)gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \
1190 ../win/gnome/gnbind.h
1191 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmenu.c
1192 $(O)gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h
1193 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnmesg.c
1194 $(O)gnopts.o: ../win/gnome/gnopts.c ../win/gnome/gnopts.h ../win/gnome/gnglyph.h \
1195 ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H)
1196 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnopts.c
1197 $(O)gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \
1198 ../win/gnome/gnmain.h $(HACK_H)
1199 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnplayer.c
1200 $(O)gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \
1201 ../win/gnome/gnmain.h
1202 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnsignal.c
1203 $(O)gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h \
1204 ../win/gnome/gnsignal.h ../win/gnome/gn_xpms.h \
1205 ../win/gnome/gnomeprv.h
1206 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnstatus.c
1207 $(O)gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \
1208 ../win/gnome/gn_rip.h
1209 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gntext.c
1210 $(O)gnworn.o: ../win/gnome/gnworn.c ../win/gnome/gnworn.h ../win/gnome/gnglyph.h \
1211 ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h
1212 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnworn.c
1213 $(O)gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h
1214 $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnyesno.c
1215 $(O)wingem.o: ../win/gem/wingem.c $(HACK_H) $(INCL)/func_tab.h $(INCL)/dlb.h \
1216 $(INCL)/patchlevel.h $(INCL)/wingem.h
1217 $(cc) $(CFLAGS) -o$@ ../win/gem/wingem.c
1218 $(O)wingem1.o: ../win/gem/wingem1.c $(INCL)/gem_rsc.h $(INCL)/load_img.h \
1219 $(INCL)/gr_rect.h $(INCL)/wintype.h $(INCL)/wingem.h
1220 $(cc) $(CFLAGS) -o$@ ../win/gem/wingem1.c
1221 $(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h
1222 $(cc) $(CFLAGS) -o$@ ../win/gem/load_img.c
1223 $(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h
1224 $(cc) $(CFLAGS) -o$@ ../win/gem/gr_rect.c
1225 $(O)tile.o: tile.c $(HACK_H)
1226 $(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \
1227 $(INCL)/dlb.h $(INCL)/patchlevel.h $(INCL)/tile2x11.h \
1228 $(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \
1229 $(INCL)/qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc
1230 $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_win.cpp
1231 $(O)qt_clust.o: ../win/Qt/qt_clust.cpp $(INCL)/qt_clust.h
1232 $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_clust.cpp
1233 $(O)qttableview.o: ../win/Qt/qttableview.cpp $(INCL)/qttableview.h
1234 $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qttableview.cpp
1235 $(O)monstr.o: monstr.c $(CONFIG_H)
1236 $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h
1237 $(O)allmain.o: allmain.c $(HACK_H)
1238 $(O)alloc.o: alloc.c $(CONFIG_H)
1239 $(O)apply.o: apply.c $(HACK_H) $(INCL)/edog.h
1240 $(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h
1241 $(O)attrib.o: attrib.c $(HACK_H)
1242 $(O)ball.o: ball.c $(HACK_H)
1243 $(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h
1244 $(O)botl.o: botl.c $(HACK_H)
1245 $(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h
1246 $(O)dbridge.o: dbridge.c $(HACK_H)
1247 $(O)decl.o: decl.c $(HACK_H)
1248 $(O)detect.o: detect.c $(HACK_H) $(INCL)/artifact.h
1249 $(O)dig.o: dig.c $(HACK_H) $(INCL)/edog.h
1250 $(O)display.o: display.c $(HACK_H)
1251 $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h
1252 $(O)do.o: do.c $(HACK_H) $(INCL)/lev.h
1253 $(O)do_name.o: do_name.c $(HACK_H)
1254 $(O)do_wear.o: do_wear.c $(HACK_H)
1255 $(O)dog.o: dog.c $(HACK_H) $(INCL)/edog.h
1256 $(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h
1257 $(O)dokick.o: dokick.c $(HACK_H) $(INCL)/eshk.h
1258 $(O)dothrow.o: dothrow.c $(HACK_H) $(INCL)/edog.h
1259 $(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h
1260 $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h
1261 $(O)eat.o: eat.c $(HACK_H)
1262 $(O)end.o: end.c $(HACK_H) $(INCL)/eshk.h $(INCL)/dlb.h
1263 $(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h
1264 $(O)exper.o: exper.c $(HACK_H)
1265 $(O)explode.o: explode.c $(HACK_H)
1266 $(O)extralev.o: extralev.c $(HACK_H)
1267 $(O)files.o: files.c $(HACK_H) $(INCL)/dlb.h
1268 $(O)fountain.o: fountain.c $(HACK_H)
1269 $(O)hack.o: hack.c $(HACK_H)
1270 $(O)hacklib.o: hacklib.c $(HACK_H)
1271 $(O)invent.o: invent.c $(HACK_H)
1272 $(O)light.o: light.c $(HACK_H) $(INCL)/lev.h
1273 $(O)lock.o: lock.c $(HACK_H)
1274 $(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h
1275 $(O)makemon.o: makemon.c $(HACK_H) $(INCL)/epri.h $(INCL)/emin.h \
1277 $(O)mapglyph.o: mapglyph.c $(HACK_H)
1278 $(O)mcastu.o: mcastu.c $(HACK_H)
1279 $(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h
1280 $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h
1281 $(O)minion.o: minion.c $(HACK_H) $(INCL)/emin.h $(INCL)/epri.h
1282 $(O)mklev.o: mklev.c $(HACK_H)
1283 $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h
1284 $(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h
1285 $(O)mkobj.o: mkobj.c $(HACK_H)
1286 $(O)mkroom.o: mkroom.c $(HACK_H)
1287 $(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h
1288 $(O)mondata.o: mondata.c $(HACK_H) $(INCL)/eshk.h $(INCL)/epri.h
1289 $(O)monmove.o: monmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h \
1291 $(O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \
1292 $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \
1293 $(INCL)/dungeon.h $(INCL)/eshk.h $(INCL)/vault.h \
1294 $(INCL)/epri.h $(INCL)/color.h
1295 $(O)mplayer.o: mplayer.c $(HACK_H)
1296 $(O)mthrowu.o: mthrowu.c $(HACK_H)
1297 $(O)muse.o: muse.c $(HACK_H) $(INCL)/edog.h
1298 $(O)music.o: music.c $(HACK_H) #interp.c
1299 $(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h
1300 $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
1301 $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h
1302 $(O)objnam.o: objnam.c $(HACK_H)
1303 $(O)options.o: options.c $(CONFIG_H) $(INCL)/objclass.h $(INCL)/flag.h \
1304 $(HACK_H) $(INCL)/tcap.h
1305 $(O)pager.o: pager.c $(HACK_H) $(INCL)/dlb.h
1306 $(O)pickup.o: pickup.c $(HACK_H)
1307 $(O)pline.o: pline.c $(HACK_H) $(INCL)/epri.h $(INCL)/edog.h
1308 $(O)polyself.o: polyself.c $(HACK_H)
1309 $(O)potion.o: potion.c $(HACK_H)
1310 $(O)pray.o: pray.c $(HACK_H) $(INCL)/epri.h
1311 $(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/eshk.h \
1312 $(INCL)/epri.h $(INCL)/emin.h
1313 $(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h
1314 $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h
1315 $(O)read.o: read.c $(HACK_H)
1316 $(O)rect.o: rect.c $(HACK_H)
1317 $(O)region.o: region.c $(HACK_H) $(INCL)/lev.h
1318 $(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h
1319 $(O)rip.o: rip.c $(HACK_H)
1320 $(O)rnd.o: rnd.c $(HACK_H)
1321 $(O)role.o: role.c $(HACK_H)
1322 $(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h
1323 $(O)save.o: save.c $(HACK_H) $(INCL)/lev.h
1324 $(O)shk.o: shk.c $(HACK_H) $(INCL)/eshk.h
1325 $(O)shknam.o: shknam.c $(HACK_H) $(INCL)/eshk.h
1326 $(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h
1327 $(O)sounds.o: sounds.c $(HACK_H) $(INCL)/edog.h
1328 $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h
1329 $(O)spell.o: spell.c $(HACK_H)
1330 $(O)steal.o: steal.c $(HACK_H)
1331 $(O)steed.o: steed.c $(HACK_H)
1332 $(O)teleport.o: teleport.c $(HACK_H)
1333 $(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h
1334 $(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(INCL)/patchlevel.h
1335 $(O)track.o: track.c $(HACK_H)
1336 $(O)trap.o: trap.c $(HACK_H)
1337 $(O)u_init.o: u_init.c $(HACK_H)
1338 $(O)uhitm.o: uhitm.c $(HACK_H)
1339 $(O)vault.o: vault.c $(HACK_H) $(INCL)/vault.h
1340 $(O)version.o: version.c $(HACK_H) $(INCL)/date.h $(INCL)/patchlevel.h
1341 $(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h
1342 $(O)weapon.o: weapon.c $(HACK_H)
1343 $(O)were.o: were.c $(HACK_H)
1344 $(O)wield.o: wield.c $(HACK_H)
1345 $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h
1346 $(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h $(INCL)/epri.h
1347 $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h
1348 $(O)worn.o: worn.c $(HACK_H)
1349 $(O)write.o: write.c $(HACK_H)
1350 $(O)zap.o: zap.c $(HACK_H)