Difference between revisions of "Makedefs"

From NetHackWiki
Jump to navigation Jump to search
(commandline params)
(Update for 3.6)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
In <code>util/makedefs.c</code> is the source for a program called '''makedefs'''. When you build a copy of ''[[NetHack]]'', it uses makedefs to generate [[date.h]], [[onames.h]], [[pm.h]], [[vis_tab.h]], and [[vis_tab.c]]. This explains why those files are missing from an unbuilt copy of the [[source code]].
 
In <code>util/makedefs.c</code> is the source for a program called '''makedefs'''. When you build a copy of ''[[NetHack]]'', it uses makedefs to generate [[date.h]], [[onames.h]], [[pm.h]], [[vis_tab.h]], and [[vis_tab.c]]. This explains why those files are missing from an unbuilt copy of the [[source code]].
  
In the [[Unix]] Makefiles, makedefs is called from the Makefiles in the src and utl directories.
+
In the [[Unix]] Makefiles, makedefs is called from the Makefiles in the src and util directories.
  
 
makedefs accepts the following commandline parameters:
 
makedefs accepts the following commandline parameters:
Line 7: Line 7:
 
* <tt>-o</tt> creates [[onames.h]]
 
* <tt>-o</tt> creates [[onames.h]]
 
* <tt>-d</tt> creates the database
 
* <tt>-d</tt> creates the database
* <tt>-e</tt> creates the dungeon.pdf (from dungeon.def)
+
* <tt>-e</tt> creates the dungeon.pdf (from [[dungeon.def format|dungeon.def]])
* <tt>-m</tt> creates [[monstr.c]]
+
* <tt>-m</tt> creates [[monstr.c]]; this file no longer has a function in [[NetHack 3.6.0]] and later, and using this option will produce a warning
 
* <tt>-v</tt> creates [[date.h]] and options-file
 
* <tt>-v</tt> creates [[date.h]] and options-file
 
* <tt>-p</tt> creates [[pm.h]]
 
* <tt>-p</tt> creates [[pm.h]]
 
* <tt>-q</tt> creates quest-file quest.dat from quest.txt
 
* <tt>-q</tt> creates quest-file quest.dat from quest.txt
 
* <tt>-r</tt> creates rumors
 
* <tt>-r</tt> creates rumors
* <tt>-h</tt> creates oracles
+
* <tt>-s</tt> creates epitaph from epitaph.txt, engrave from engrave.txt and bogusmon and bogusmon.txt
 +
* <tt>-h</tt> creates oracles from oracles.txt and adds one special oracularity defined in makedefs.c itself
 
* <tt>-z</tt> creates [[vis_tab.h]] and [[vis_tab.c]] (vision lookup tables)
 
* <tt>-z</tt> creates [[vis_tab.h]] and [[vis_tab.c]] (vision lookup tables)
 
+
[[Category:Annotations]]
[[Category:Source code]]
+
{{nethack-364}}

Latest revision as of 21:15, 13 March 2020

In util/makedefs.c is the source for a program called makedefs. When you build a copy of NetHack, it uses makedefs to generate date.h, onames.h, pm.h, vis_tab.h, and vis_tab.c. This explains why those files are missing from an unbuilt copy of the source code.

In the Unix Makefiles, makedefs is called from the Makefiles in the src and util directories.

makedefs accepts the following commandline parameters:

  • -o creates onames.h
  • -d creates the database
  • -e creates the dungeon.pdf (from dungeon.def)
  • -m creates monstr.c; this file no longer has a function in NetHack 3.6.0 and later, and using this option will produce a warning
  • -v creates date.h and options-file
  • -p creates pm.h
  • -q creates quest-file quest.dat from quest.txt
  • -r creates rumors
  • -s creates epitaph from epitaph.txt, engrave from engrave.txt and bogusmon and bogusmon.txt
  • -h creates oracles from oracles.txt and adds one special oracularity defined in makedefs.c itself
  • -z creates vis_tab.h and vis_tab.c (vision lookup tables)

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.4. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-364}} tag to the current version's tag or {{noversion}} as appropriate.