ref: ed0a9496b367e21e854ca457a3d19b1937874683
parent: 2053768a9251cbd4c731681a3e1e04c800ad21f4
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jan 29 02:38:30 EST 2023
first libdoom.a compile
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -25,7 +25,9 @@
#include <stdlib.h>
#include <string.h>
+#ifndef __plan9__
#include "config.h"
+#endif
#include "deh_main.h"
#include "doomdef.h"
#include "doomstat.h"
--- /dev/null
+++ b/src/doom/mkfile
@@ -1,0 +1,114 @@
+</$objtype/mkfile
+
+CFLAGS=-Fpw --I/sys/include/npe -I/sys/include/npe/SDL2 -I.. -D__plan9__ -D__${objtype}__ -p -D__plan9_keep_main__ -DPROGRAM_PREFIX="9" -DPACKAGE_STRING=""
+LIB=libdoom.a
+OFILES=\
+ am_map.$O \
+ deh_ammo.$O \
+ deh_bexstr.$O \
+ deh_cheat.$O \
+ deh_doom.$O \
+ deh_frame.$O \
+ deh_misc.$O \
+ deh_ptr.$O \
+ deh_sound.$O \
+ deh_thing.$O \
+ deh_weapon.$O \
+ d_items.$O \
+ d_main.$O \
+ d_net.$O \
+ doomdef.$O \
+ doomstat.$O \
+ dstrings.$O \
+ f_finale.$O \
+ f_wipe.$O \
+ g_game.$O \
+ hu_lib.$O \
+ hu_stuff.$O \
+ info.$O \
+ m_menu.$O \
+ m_random.$O \
+ p_ceilng.$O \
+ p_doors.$O \
+ p_enemy.$O \
+ p_floor.$O \
+ p_inter.$O \
+ p_lights.$O \
+ p_map.$O \
+ p_maputl.$O \
+ p_mobj.$O \
+ p_plats.$O \
+ p_pspr.$O \
+ p_saveg.$O \
+ p_setup.$O \
+ p_sight.$O \
+ p_spec.$O \
+ p_switch.$O \
+ p_telept.$O \
+ p_tick.$O \
+ p_user.$O \
+ r_bsp.$O \
+ r_data.$O \
+ r_draw.$O \
+ r_main.$O \
+ r_plane.$O \
+ r_segs.$O \
+ r_sky.$O \
+ r_things.$O \
+ s_sound.$O \
+ sounds.$O \
+ statdump.$O \
+ st_lib.$O \
+ st_stuff.$O \
+ wi_stuff.$O \
+
+HFILES=\
+ am_map.h \
+ deh_misc.h \
+ deh_misc.h \
+ d_englsh.h \
+ d_items.h \
+ d_main.h \
+ doomdata.h \
+ doomdef.h \
+ doomstat.h \
+ doomstat.h \
+ d_player.h \
+ dstrings.h \
+ d_textur.h \
+ d_think.h \
+ f_finale.h \
+ f_wipe.h \
+ g_game.h \
+ hu_lib.h \
+ hu_stuff.h \
+ info.h \
+ m_menu.h \
+ m_random.h \
+ p_inter.h \
+ p_local.h \
+ p_mobj.h \
+ p_pspr.h \
+ p_saveg.h \
+ p_setup.h \
+ p_spec.h \
+ p_tick.h \
+ r_bsp.h \
+ r_data.h \
+ r_defs.h \
+ r_draw.h \
+ r_local.h \
+ r_main.h \
+ r_plane.h \
+ r_segs.h \
+ r_sky.h \
+ r_state.h \
+ r_things.h \
+ s_sound.h \
+ sounds.h \
+ statdump.h \
+ st_lib.h \
+ st_stuff.h \
+ wi_stuff.h \
+
+</sys/src/cmd/mksyslib
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -21,7 +21,9 @@
#ifndef __DOOMTYPE__
#define __DOOMTYPE__
+#ifndef __plan9__
#include "config.h"
+#endif
#if defined(_MSC_VER) && !defined(__cplusplus)
#define inline __inline
@@ -31,7 +33,7 @@
// Outside Windows, we use strings.h for str[n]casecmp.
-#if !HAVE_DECL_STRCASECMP || !HAVE_DECL_STRNCASECMP
+#if (!HAVE_DECL_STRCASECMP || !HAVE_DECL_STRNCASECMP) && !__plan9__
#include <string.h>
#if !HAVE_DECL_STRCASECMP