Some support of new code #defines to faciliate cross-compiling:
OPTIONS_AT_RUNTIME If this is defined, code to support obtaining
the compile time options and features is
included. If you define this, you'll also have
to compile sys/mdlib.c and link the resulting
object file into your game binary/executable.
CROSSCOMPILE Flags that this is a cross-compiled NetHack build,
where there are two stages:
1. makedefs and some other utilities are compiled
on the host platform and executed there to generate
some output files and header files needed by the
game.
2. the NetHack game files are compiled by a
cross-compiler to generate binary/executables for
a different platform than the one the build is
being run on. The executables produced for the
target platform may not be able to execute on the
build platform, except perhaps via a software
emulator.
The 2-stage process (1. host, 2.target) can be done
on the same platform to test the cross-compile
process. In that case, the host and target platforms
would be the same.
CROSSCOMPILE_HOST Separates/identifies code paths that should only be
be included in the compile on the host side, for
utilities that will be run on the host as part of
stage 1 to produce output files needed to build the
game. Examples are the code for makedefs, tile
conversion utilities, uudecode, dlb, etc.
CROSSCOMPILE_TARGET Separates/identifies code paths that should be
included on the build for the target platform
during stage 2, the cross-compiler stage. That
includes most of the pieces of the game itself
but the code is only flagged as such if it must
not execute on the host.
If you don't define any of those, things should build as before.
One follow-on change that is likely required is setting the new dependency
makedefs has on src/mdlib.c in Makefiles etc.
More information about the changes:
makedefs
- splinter off some of makedefs functionality into a separate file
called src/mdlib.c.
- src/mdlib.c, while included during the compile of makedefs.c
for producing the makedefs utility, can also be compiled
as a stand-alone object file for inclusion in the link step
of your NetHack game build. The src/mdlib.c code can then
deliver the same functionality that it provided to makedefs
right to your NetHack game code at run-time.
For example, do_runtime_info() will provide the caller with
the features and options that were built into the game.
Previously, that information was produced at build time on the
host and stored in a dat file. Under a cross-compile situation,
those values are highly suspect and might not even reflect the
correct options and setting for the cross-compiled target
platform's binary/executable. The compile of those values and
the functionality to obtain them needs to move to the target
cross-compiler stage of the build (stage 2).
- date information on the target-side binary is produced from
the cross-compiler preprocessor pre-defined macros __DATE__
and __TIME__, as they reflect the actual compile time of the
cross-compiled target and not host-side execution of a utility
to produce them. The cross-compiler itself, through those
pre-defined preprocessor macros, provides them to the target
platform binary/executable. They reflect the actual build
time of the target binary/executable (not values produced
at the time the makefiles utility was built and the
appropriate option selected to store them in a text file.)
- most Makefiles should not require adding the new file
src/mdlib.c because util/makedefs.c has a preprocessor
include "../src/mdlib.c" to draw in its contents. As previously
stated though, the Makefile dependency may be required:
makedefs.o: ../util/makedefs.c ../src/mdlib.c
^^^^^^^^^^^^^^^
202 lines
16 KiB
C
202 lines
16 KiB
C
/* NetHack 3.7 sfproto.h */
|
|
/* Copyright (c) NetHack Development Team 2019. */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */
|
|
|
|
#ifndef SFPROTO_H
|
|
#define SFPROTO_H
|
|
|
|
#include "hack.h"
|
|
#include "integer.h"
|
|
#include "wintype.h"
|
|
|
|
#define E extern
|
|
|
|
E int NDECL(critical_members_count);
|
|
/* sfbase.c output functions */
|
|
E void FDECL(sfo_addinfo, (NHFILE *, const char *, const char *, const char *, int));
|
|
E void FDECL(sfo_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int));
|
|
E void FDECL(sfo_any, (NHFILE *, anything *, const char *, const char *, int));
|
|
E void FDECL(sfo_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int));
|
|
E void FDECL(sfo_boolean, (NHFILE *, boolean *, const char *, const char *, int));
|
|
E void FDECL(sfo_char, (NHFILE *, const char *, const char *, const char *, int));
|
|
E void FDECL(sfo_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int));
|
|
E void FDECL(sfo_int, (NHFILE *, int *, const char *, const char *, int));
|
|
E void FDECL(sfo_long, (NHFILE *, long *, const char *, const char *, int));
|
|
E void FDECL(sfo_schar, (NHFILE *, schar *, const char *, const char *, int));
|
|
E void FDECL(sfo_short, (NHFILE *, short *, const char *, const char *, int));
|
|
E void FDECL(sfo_size_t, (NHFILE *, size_t *, const char *, const char *, int));
|
|
E void FDECL(sfo_time_t, (NHFILE *, time_t *, const char *, const char *, int));
|
|
E void FDECL(sfo_uchar, (NHFILE *, uchar *, const char *, const char *, int));
|
|
E void FDECL(sfo_unsigned, (NHFILE *, unsigned *, const char *, const char *, int));
|
|
E void FDECL(sfo_uchar, (NHFILE *, unsigned char *, const char *, const char *, int));
|
|
E void FDECL(sfo_uint, (NHFILE *, unsigned int *, const char *, const char *, int));
|
|
E void FDECL(sfo_ulong, (NHFILE *, unsigned long *, const char *, const char *, int));
|
|
E void FDECL(sfo_ushort, (NHFILE *, unsigned short *, const char *, const char *, int));
|
|
E void FDECL(sfo_xchar, (NHFILE *, xchar *, const char *, const char *, int));
|
|
E void FDECL(sfo_str, (NHFILE *, const char *, const char *, const char *, int));
|
|
/* sfbase.c input functions */
|
|
E void FDECL(sfi_addinfo, (NHFILE *, const char *, const char *, const char *, int));
|
|
E void FDECL(sfi_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int));
|
|
E void FDECL(sfi_any, (NHFILE *, anything *, const char *, const char *, int));
|
|
E void FDECL(sfi_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int));
|
|
E void FDECL(sfi_boolean, (NHFILE *, boolean *, const char *, const char *, int));
|
|
E void FDECL(sfi_char, (NHFILE *, const char *, const char *, const char *, int));
|
|
E void FDECL(sfi_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int));
|
|
E void FDECL(sfi_int, (NHFILE *, int *, const char *, const char *, int));
|
|
E void FDECL(sfi_long, (NHFILE *, long *, const char *, const char *, int));
|
|
E void FDECL(sfi_schar, (NHFILE *, schar *, const char *, const char *, int));
|
|
E void FDECL(sfi_short, (NHFILE *, short *, const char *, const char *, int));
|
|
E void FDECL(sfi_size_t, (NHFILE *, size_t *, const char *, const char *, int));
|
|
E void FDECL(sfi_time_t, (NHFILE *, time_t *, const char *, const char *, int));
|
|
E void FDECL(sfi_uchar, (NHFILE *, uchar *, const char *, const char *, int));
|
|
E void FDECL(sfi_unsigned, (NHFILE *, unsigned *, const char *, const char *, int));
|
|
E void FDECL(sfi_uchar, (NHFILE *, unsigned char *, const char *, const char *, int));
|
|
E void FDECL(sfi_uint, (NHFILE *, unsigned int *, const char *, const char *, int));
|
|
E void FDECL(sfi_ulong, (NHFILE *, unsigned long *, const char *, const char *, int));
|
|
E void FDECL(sfi_ushort, (NHFILE *, unsigned short *, const char *, const char *, int));
|
|
E void FDECL(sfi_xchar, (NHFILE *, xchar *, const char *, const char *, int));
|
|
E void FDECL(sfi_str, (NHFILE *, const char *, const char *, const char *, int));
|
|
/* generated output functions */
|
|
E void FDECL(sfo_align, (NHFILE *, struct align *, const char *, const char *, int));
|
|
E void FDECL(sfo_attribs, (NHFILE *, struct attribs *, const char *, const char *, int));
|
|
E void FDECL(sfo_bill_x, (NHFILE *, struct bill_x *, const char *, const char *, int));
|
|
E void FDECL(sfo_book_info, (NHFILE *, struct book_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_branch, (NHFILE *, struct branch *, const char *, const char *, int));
|
|
E void FDECL(sfo_bubble, (NHFILE *, struct bubble *, const char *, const char *, int));
|
|
E void FDECL(sfo_cemetery, (NHFILE *, struct cemetery *, const char *, const char *, int));
|
|
E void FDECL(sfo_context_info, (NHFILE *, struct context_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_d_flags, (NHFILE *, struct d_flags *, const char *, const char *, int));
|
|
E void FDECL(sfo_d_level, (NHFILE *, struct d_level *, const char *, const char *, int));
|
|
E void FDECL(sfo_damage, (NHFILE *, struct damage *, const char *, const char *, int));
|
|
E void FDECL(sfo_dest_area, (NHFILE *, struct dest_area *, const char *, const char *, int));
|
|
E void FDECL(sfo_dgn_topology, (NHFILE *, struct dgn_topology *, const char *, const char *, int));
|
|
E void FDECL(sfo_dig_info, (NHFILE *, struct dig_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_dungeon, (NHFILE *, struct dungeon *, const char *, const char *, int));
|
|
E void FDECL(sfo_edog, (NHFILE *, struct edog *, const char *, const char *, int));
|
|
E void FDECL(sfo_egd, (NHFILE *, struct egd *, const char *, const char *, int));
|
|
E void FDECL(sfo_emin, (NHFILE *, struct emin *, const char *, const char *, int));
|
|
E void FDECL(sfo_engr, (NHFILE *, struct engr *, const char *, const char *, int));
|
|
E void FDECL(sfo_epri, (NHFILE *, struct epri *, const char *, const char *, int));
|
|
E void FDECL(sfo_eshk, (NHFILE *, struct eshk *, const char *, const char *, int));
|
|
E void FDECL(sfo_fakecorridor, (NHFILE *, struct fakecorridor *, const char *, const char *, int));
|
|
E void FDECL(sfo_fe, (NHFILE *, struct fe *, const char *, const char *, int));
|
|
E void FDECL(sfo_flag, (NHFILE *, struct flag *, const char *, const char *, int));
|
|
E void FDECL(sfo_fruit, (NHFILE *, struct fruit *, const char *, const char *, int));
|
|
E void FDECL(sfo_kinfo, (NHFILE *, struct kinfo *, const char *, const char *, int));
|
|
E void FDECL(sfo_levelflags, (NHFILE *, struct levelflags *, const char *, const char *, int));
|
|
E void FDECL(sfo_linfo, (NHFILE *, struct linfo *, const char *, const char *, int));
|
|
E void FDECL(sfo_ls_t, (NHFILE *, struct ls_t *, const char *, const char *, int));
|
|
E void FDECL(sfo_mapseen_feat, (NHFILE *, struct mapseen_feat *, const char *, const char *, int));
|
|
E void FDECL(sfo_mapseen_flags, (NHFILE *, struct mapseen_flags *, const char *, const char *, int));
|
|
E void FDECL(sfo_mapseen_rooms, (NHFILE *, struct mapseen_rooms *, const char *, const char *, int));
|
|
E void FDECL(sfo_mapseen, (NHFILE *, struct mapseen *, const char *, const char *, int));
|
|
E void FDECL(sfo_mextra, (NHFILE *, struct mextra *, const char *, const char *, int));
|
|
E void FDECL(sfo_mkroom, (NHFILE *, struct mkroom *, const char *, const char *, int));
|
|
E void FDECL(sfo_monst, (NHFILE *, struct monst *, const char *, const char *, int));
|
|
E void FDECL(sfo_mvitals, (NHFILE *, struct mvitals *, const char *, const char *, int));
|
|
E void FDECL(sfo_nhcoord, (NHFILE *, struct nhcoord *, const char *, const char *, int));
|
|
E void FDECL(sfo_nhrect, (NHFILE *, struct nhrect *, const char *, const char *, int));
|
|
E void FDECL(sfo_novel_tracking, (NHFILE *, struct novel_tracking *, const char *, const char *, int));
|
|
E void FDECL(sfo_obj, (NHFILE *, struct obj *, const char *, const char *, int));
|
|
E void FDECL(sfo_objclass, (NHFILE *, struct objclass *, const char *, const char *, int));
|
|
E void FDECL(sfo_obj_split, (NHFILE *, struct obj_split *, const char *, const char *, int));
|
|
E void FDECL(sfo_oextra, (NHFILE *, struct oextra *, const char *, const char *, int));
|
|
E void FDECL(sfo_polearm_info, (NHFILE *, struct polearm_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_prop, (NHFILE *, struct prop *, const char *, const char *, int));
|
|
E void FDECL(sfo_q_score, (NHFILE *, struct q_score *, const char *, const char *, int));
|
|
E void FDECL(sfo_rm, (NHFILE *, struct rm *, const char *, const char *, int));
|
|
E void FDECL(sfo_s_level, (NHFILE *, struct s_level *, const char *, const char *, int));
|
|
E void FDECL(sfo_savefile_info, (NHFILE *, struct savefile_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_skills, (NHFILE *, struct skills *, const char *, const char *, int));
|
|
E void FDECL(sfo_spell, (NHFILE *, struct spell *, const char *, const char *, int));
|
|
E void FDECL(sfo_stairway, (NHFILE *, struct stairway *, const char *, const char *, int));
|
|
E void FDECL(sfo_takeoff_info, (NHFILE *, struct takeoff_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_tin_info, (NHFILE *, struct tin_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_trap, (NHFILE *, struct trap *, const char *, const char *, int));
|
|
E void FDECL(sfo_tribute_info, (NHFILE *, struct tribute_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_u_achieve, (NHFILE *, struct u_achieve *, const char *, const char *, int));
|
|
E void FDECL(sfo_u_conduct, (NHFILE *, struct u_conduct *, const char *, const char *, int));
|
|
E void FDECL(sfo_u_event, (NHFILE *, struct u_event *, const char *, const char *, int));
|
|
E void FDECL(sfo_u_have, (NHFILE *, struct u_have *, const char *, const char *, int));
|
|
E void FDECL(sfo_u_realtime, (NHFILE *, struct u_realtime *, const char *, const char *, int));
|
|
E void FDECL(sfo_u_roleplay, (NHFILE *, struct u_roleplay *, const char *, const char *, int));
|
|
E void FDECL(sfo_version_info, (NHFILE *, struct version_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_victual_info, (NHFILE *, struct victual_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_vlaunchinfo, (NHFILE *, union vlaunchinfo *, const char *, const char *, int));
|
|
E void FDECL(sfo_vptrs, (NHFILE *, union vptrs *, const char *, const char *, int));
|
|
E void FDECL(sfo_warntype_info, (NHFILE *, struct warntype_info *, const char *, const char *, int));
|
|
E void FDECL(sfo_you, (NHFILE *, struct you *, const char *, const char *, int));
|
|
/* generated input functions */
|
|
E void FDECL(sfi_align, (NHFILE *, struct align *, const char *, const char *, int));
|
|
E void FDECL(sfi_attribs, (NHFILE *, struct attribs *, const char *, const char *, int));
|
|
E void FDECL(sfi_bill_x, (NHFILE *, struct bill_x *, const char *, const char *, int));
|
|
E void FDECL(sfi_book_info, (NHFILE *, struct book_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_branch, (NHFILE *, struct branch *, const char *, const char *, int));
|
|
E void FDECL(sfi_bubble, (NHFILE *, struct bubble *, const char *, const char *, int));
|
|
E void FDECL(sfi_cemetery, (NHFILE *, struct cemetery *, const char *, const char *, int));
|
|
E void FDECL(sfi_context_info, (NHFILE *, struct context_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_d_flags, (NHFILE *, struct d_flags *, const char *, const char *, int));
|
|
E void FDECL(sfi_d_level, (NHFILE *, struct d_level *, const char *, const char *, int));
|
|
E void FDECL(sfi_damage, (NHFILE *, struct damage *, const char *, const char *, int));
|
|
E void FDECL(sfi_dest_area, (NHFILE *, struct dest_area *, const char *, const char *, int));
|
|
E void FDECL(sfi_dgn_topology, (NHFILE *, struct dgn_topology *, const char *, const char *, int));
|
|
E void FDECL(sfi_dig_info, (NHFILE *, struct dig_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_dungeon, (NHFILE *, struct dungeon *, const char *, const char *, int));
|
|
E void FDECL(sfi_edog, (NHFILE *, struct edog *, const char *, const char *, int));
|
|
E void FDECL(sfi_egd, (NHFILE *, struct egd *, const char *, const char *, int));
|
|
E void FDECL(sfi_emin, (NHFILE *, struct emin *, const char *, const char *, int));
|
|
E void FDECL(sfi_engr, (NHFILE *, struct engr *, const char *, const char *, int));
|
|
E void FDECL(sfi_epri, (NHFILE *, struct epri *, const char *, const char *, int));
|
|
E void FDECL(sfi_eshk, (NHFILE *, struct eshk *, const char *, const char *, int));
|
|
E void FDECL(sfi_fakecorridor, (NHFILE *, struct fakecorridor *, const char *, const char *, int));
|
|
E void FDECL(sfi_fe, (NHFILE *, struct fe *, const char *, const char *, int));
|
|
E void FDECL(sfi_flag, (NHFILE *, struct flag *, const char *, const char *, int));
|
|
E void FDECL(sfi_fruit, (NHFILE *, struct fruit *, const char *, const char *, int));
|
|
E void FDECL(sfi_kinfo, (NHFILE *, struct kinfo *, const char *, const char *, int));
|
|
E void FDECL(sfi_levelflags, (NHFILE *, struct levelflags *, const char *, const char *, int));
|
|
E void FDECL(sfi_linfo, (NHFILE *, struct linfo *, const char *, const char *, int));
|
|
E void FDECL(sfi_ls_t, (NHFILE *, struct ls_t *, const char *, const char *, int));
|
|
E void FDECL(sfi_mapseen_feat, (NHFILE *, struct mapseen_feat *, const char *, const char *, int));
|
|
E void FDECL(sfi_mapseen_flags, (NHFILE *, struct mapseen_flags *, const char *, const char *, int));
|
|
E void FDECL(sfi_mapseen_rooms, (NHFILE *, struct mapseen_rooms *, const char *, const char *, int));
|
|
E void FDECL(sfi_mapseen, (NHFILE *, struct mapseen *, const char *, const char *, int));
|
|
E void FDECL(sfi_mextra, (NHFILE *, struct mextra *, const char *, const char *, int));
|
|
E void FDECL(sfi_mkroom, (NHFILE *, struct mkroom *, const char *, const char *, int));
|
|
E void FDECL(sfi_monst, (NHFILE *, struct monst *, const char *, const char *, int));
|
|
E void FDECL(sfi_mvitals, (NHFILE *, struct mvitals *, const char *, const char *, int));
|
|
E void FDECL(sfi_nhcoord, (NHFILE *, struct nhcoord *, const char *, const char *, int));
|
|
E void FDECL(sfi_nhrect, (NHFILE *, struct nhrect *, const char *, const char *, int));
|
|
E void FDECL(sfi_novel_tracking, (NHFILE *, struct novel_tracking *, const char *, const char *, int));
|
|
E void FDECL(sfi_obj, (NHFILE *, struct obj *, const char *, const char *, int));
|
|
E void FDECL(sfi_objclass, (NHFILE *, struct objclass *, const char *, const char *, int));
|
|
E void FDECL(sfi_obj_split, (NHFILE *, struct obj_split *, const char *, const char *, int));
|
|
E void FDECL(sfi_oextra, (NHFILE *, struct oextra *, const char *, const char *, int));
|
|
E void FDECL(sfi_polearm_info, (NHFILE *, struct polearm_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_prop, (NHFILE *, struct prop *, const char *, const char *, int));
|
|
E void FDECL(sfi_q_score, (NHFILE *, struct q_score *, const char *, const char *, int));
|
|
E void FDECL(sfi_rm, (NHFILE *, struct rm *, const char *, const char *, int));
|
|
E void FDECL(sfi_s_level, (NHFILE *, struct s_level *, const char *, const char *, int));
|
|
E void FDECL(sfi_savefile_info, (NHFILE *, struct savefile_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_skills, (NHFILE *, struct skills *, const char *, const char *, int));
|
|
E void FDECL(sfi_spell, (NHFILE *, struct spell *, const char *, const char *, int));
|
|
E void FDECL(sfi_stairway, (NHFILE *, struct stairway *, const char *, const char *, int));
|
|
E void FDECL(sfi_takeoff_info, (NHFILE *, struct takeoff_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_tin_info, (NHFILE *, struct tin_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_trap, (NHFILE *, struct trap *, const char *, const char *, int));
|
|
E void FDECL(sfi_tribute_info, (NHFILE *, struct tribute_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_u_achieve, (NHFILE *, struct u_achieve *, const char *, const char *, int));
|
|
E void FDECL(sfi_u_conduct, (NHFILE *, struct u_conduct *, const char *, const char *, int));
|
|
E void FDECL(sfi_u_event, (NHFILE *, struct u_event *, const char *, const char *, int));
|
|
E void FDECL(sfi_u_have, (NHFILE *, struct u_have *, const char *, const char *, int));
|
|
E void FDECL(sfi_u_realtime, (NHFILE *, struct u_realtime *, const char *, const char *, int));
|
|
E void FDECL(sfi_u_roleplay, (NHFILE *, struct u_roleplay *, const char *, const char *, int));
|
|
E void FDECL(sfi_version_info, (NHFILE *, struct version_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_victual_info, (NHFILE *, struct victual_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_vlaunchinfo, (NHFILE *, union vlaunchinfo *, const char *, const char *, int));
|
|
E void FDECL(sfi_vptrs, (NHFILE *, union vptrs *, const char *, const char *, int));
|
|
E void FDECL(sfi_warntype_info, (NHFILE *, struct warntype_info *, const char *, const char *, int));
|
|
E void FDECL(sfi_you, (NHFILE *, struct you *, const char *, const char *, int));
|
|
#endif /* SFPROTO_H */
|