foxygit / doom Log in
commit 2c7e16c3e4fcebf4eae907eb76da33dc86c8ea63
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Tue Jan 24 23:02:56 2017 +0000
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Tue Jan 24 23:02:56 2017 +0000

    Remove doomfeatures.h and "features" compiles.

    This was an idea I had a while back to allow slimmed-down compiles
    that would remove certain chocolatey features. As far as I know,
    nobody's ever used it, it isn't regularly tested, and it hasn't been
    kept up to date as development has progressed. Given this, and
    considering that it makes the Makefiles much more complicated to read,
    let's just get rid of it.
---
 src/Makefile.am         | 69 +++++++++++++++++--------------------------------
 src/d_loop.c            | 16 ------------
 src/deh_main.h          |  1 -
 src/deh_str.h           |  7 ++---
 src/doom/Makefile.am    | 27 ++++++++-----------
 src/doom/d_main.c       | 10 -------
 src/doom/d_net.c        |  2 --
 src/doom/deh_misc.h     | 40 +++++++++++++---------------
 src/doom/deh_sound.c    |  1 -
 src/doom/s_sound.c      |  1 -
 src/doomfeatures.h      | 40 ----------------------------
 src/heretic/Makefile.am | 21 ++++++---------
 src/heretic/d_main.c    |  8 ------
 src/heretic/d_net.c     |  2 --
 src/heretic/deh_sound.c |  1 -
 src/hexen/Makefile.am   |  3 +--
 src/hexen/d_net.c       |  2 --
 src/hexen/h2_main.c     |  5 ----
 src/i_sound.c           |  7 -----
 src/m_config.c          |  9 -------
 src/setup/Makefile.am   |  4 +--
 src/setup/multiplayer.c |  3 ---
 src/strife/Makefile.am  | 25 +++++++-----------
 src/strife/d_main.c     | 10 -------
 src/strife/d_net.c      |  2 --
 src/strife/deh_misc.h   | 40 +++++++++++++---------------
 src/strife/deh_sound.c  |  1 -
 src/strife/s_sound.c    |  1 -
 src/w_main.c            |  5 ----
 29 files changed, 93 insertions(+), 270 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 8b97f91a..ab691a21 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,29 +53,48 @@ z_native.c           z_zone.h
 # Source files used by the game binaries (chocolate-doom, etc.)

 GAME_SOURCE_FILES=\
+aes_prng.c           aes_prng.h            \
 d_event.c            d_event.h             \
                      doomkeys.h            \
-                     doomfeatures.h        \
                      doomtype.h            \
 d_iwad.c             d_iwad.h              \
 d_loop.c             d_loop.h              \
 d_mode.c             d_mode.h              \
                      d_ticcmd.h            \
 deh_str.c            deh_str.h             \
+gusconf.c            gusconf.h             \
 i_cdmus.c            i_cdmus.h             \
 i_endoom.c           i_endoom.h            \
 i_input.c            i_input.h             \
 i_joystick.c         i_joystick.h          \
                      i_swap.h              \
+i_oplmusic.c                               \
+i_pcsound.c                                \
+i_sdlmusic.c                               \
+i_sdlsound.c                               \
 i_sound.c            i_sound.h             \
 i_timer.c            i_timer.h             \
 i_video.c            i_video.h             \
 i_videohr.c          i_videohr.h           \
+midifile.c           midifile.h            \
+mus2mid.c            mus2mid.h             \
 m_bbox.c             m_bbox.h              \
 m_cheat.c            m_cheat.h             \
 m_config.c           m_config.h            \
 m_controls.c         m_controls.h          \
 m_fixed.c            m_fixed.h             \
+net_client.c         net_client.h          \
+net_common.c         net_common.h          \
+net_dedicated.c      net_dedicated.h       \
+net_defs.h                                 \
+net_gui.c            net_gui.h             \
+net_io.c             net_io.h              \
+net_loop.c           net_loop.h            \
+net_packet.c         net_packet.h          \
+net_query.c          net_query.h           \
+net_sdl.c            net_sdl.h             \
+net_server.c         net_server.h          \
+net_structrw.c       net_structrw.h        \
 sha1.c               sha1.h                \
 memio.c              memio.h               \
 tables.c             tables.h              \
@@ -89,60 +108,20 @@ w_file.c             w_file.h              \
 w_file_stdc.c                              \
 w_file_posix.c                             \
 w_file_win32.c                             \
+w_merge.c            w_merge.h             \
 z_zone.c             z_zone.h

-# source files needed for FEATURE_DEHACKED
-
-FEATURE_DEHACKED_SOURCE_FILES =            \
+DEHACKED_SOURCE_FILES =                    \
 deh_defs.h                                 \
 deh_io.c             deh_io.h              \
 deh_main.c           deh_main.h            \
 deh_mapping.c        deh_mapping.h         \
 deh_text.c

-# source files needed for FEATURE_MULTIPLAYER
-
-FEATURE_MULTIPLAYER_SOURCE_FILES=          \
-aes_prng.c           aes_prng.h            \
-net_client.c         net_client.h          \
-net_common.c         net_common.h          \
-net_dedicated.c      net_dedicated.h       \
-net_defs.h                                 \
-net_gui.c            net_gui.h             \
-net_io.c             net_io.h              \
-net_loop.c           net_loop.h            \
-net_packet.c         net_packet.h          \
-net_query.c          net_query.h           \
-net_sdl.c            net_sdl.h             \
-net_server.c         net_server.h          \
-net_structrw.c       net_structrw.h
-
-# source files needed for FEATURE_WAD_MERGE
-
-FEATURE_WAD_MERGE_SOURCE_FILES =           \
-w_merge.c            w_merge.h
-
-# source files needed for FEATURE_SOUND
-
-FEATURE_SOUND_SOURCE_FILES =               \
-gusconf.c            gusconf.h             \
-i_pcsound.c                                \
-i_sdlsound.c                               \
-i_sdlmusic.c                               \
-i_oplmusic.c                               \
-midifile.c           midifile.h            \
-mus2mid.c            mus2mid.h
-
 # Some games support dehacked patches, some don't:

-SOURCE_FILES = $(COMMON_SOURCE_FILES)              \
-               $(GAME_SOURCE_FILES)                \
-               $(FEATURE_WAD_MERGE_SOURCE_FILES)   \
-               $(FEATURE_SOUND_SOURCE_FILES)       \
-               $(FEATURE_MULTIPLAYER_SOURCE_FILES)
-
-SOURCE_FILES_WITH_DEH = $(SOURCE_FILES)                    \
-                        $(FEATURE_DEHACKED_SOURCE_FILES)
+SOURCE_FILES = $(COMMON_SOURCE_FILES) $(GAME_SOURCE_FILES)
+SOURCE_FILES_WITH_DEH = $(SOURCE_FILES) $(DEHACKED_SOURCE_FILES)

 EXTRA_LIBS =                                               \
                $(top_builddir)/textscreen/libtextscreen.a  \
diff --git a/src/d_loop.c b/src/d_loop.c
index 4459a2a4..a94f1e2d 100644
--- a/src/d_loop.c
+++ b/src/d_loop.c
@@ -19,8 +19,6 @@
 #include <stdlib.h>
 #include <string.h>

-#include "doomfeatures.h"
-
 #include "d_event.h"
 #include "d_loop.h"
 #include "d_ticcmd.h"
@@ -183,14 +181,11 @@ static boolean BuildNewTic(void)
     memset(&cmd, 0, sizeof(ticcmd_t));
     loop_interface->BuildTiccmd(&cmd, maketic);

-#ifdef FEATURE_MULTIPLAYER
-
     if (net_client_connected)
     {
         NET_CL_SendTiccmd(&cmd, maketic);
     }

-#endif
     ticdata[maketic % BACKUPTICS].cmds[localplayer] = cmd;
     ticdata[maketic % BACKUPTICS].ingame[localplayer] = true;

@@ -218,15 +213,11 @@ void NetUpdate (void)
     if (singletics)
         return;

-#ifdef FEATURE_MULTIPLAYER
-
     // Run network subsystems

     NET_CL_Run();
     NET_SV_Run();

-#endif
-
     // check time
     nowtime = GetAdjustedTime() / ticdup;
     newtics = nowtime - lasttime;
@@ -452,8 +443,6 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)

     player_class = connect_data->player_class;

-#ifdef FEATURE_MULTIPLAYER
-
     //!
     // @category net
     //
@@ -535,7 +524,6 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)

         result = true;
     }
-#endif

     return result;
 }
@@ -548,10 +536,8 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)
 //
 void D_QuitNetGame (void)
 {
-#ifdef FEATURE_MULTIPLAYER
     NET_SV_Shutdown();
     NET_CL_Disconnect();
-#endif
 }

 static int GetLowTic(void)
@@ -560,7 +546,6 @@ static int GetLowTic(void)

     lowtic = maketic;

-#ifdef FEATURE_MULTIPLAYER
     if (net_client_connected)
     {
         if (drone || recvtic < lowtic)
@@ -568,7 +553,6 @@ static int GetLowTic(void)
             lowtic = recvtic;
         }
     }
-#endif

     return lowtic;
 }
diff --git a/src/deh_main.h b/src/deh_main.h
index 10ac2360..0e706c3b 100644
--- a/src/deh_main.h
+++ b/src/deh_main.h
@@ -19,7 +19,6 @@
 #define DEH_MAIN_H

 #include "doomtype.h"
-#include "doomfeatures.h"
 #include "deh_str.h"
 #include "sha1.h"

diff --git a/src/deh_str.h b/src/deh_str.h
index be06e706..7abb1c44 100644
--- a/src/deh_str.h
+++ b/src/deh_str.h
@@ -20,12 +20,8 @@

 #include <stdio.h>

-#include "doomfeatures.h"
-
 // Used to do dehacked text substitutions throughout the program

-#ifdef FEATURE_DEHACKED
-
 char *DEH_String(char *s);
 void DEH_printf(char *fmt, ...);
 void DEH_fprintf(FILE *fstream, char *fmt, ...);
@@ -33,7 +29,8 @@ void DEH_snprintf(char *buffer, size_t len, char *fmt, ...);
 void DEH_AddStringReplacement(char *from_text, char *to_text);


-#else
+#if 0
+// Static macro versions of the functions above

 #define DEH_String(x) (x)
 #define DEH_printf printf
diff --git a/src/doom/Makefile.am b/src/doom/Makefile.am
index e2ce86b4..cbb859d0 100644
--- a/src/doom/Makefile.am
+++ b/src/doom/Makefile.am
@@ -2,8 +2,18 @@ AM_CFLAGS = -I$(top_srcdir)/src @SDL_CFLAGS@ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@

 noinst_LIBRARIES=libdoom.a

-SOURCE_FILES=                   \
+libdoom_a_SOURCES =             \
 am_map.c           am_map.h     \
+deh_ammo.c                      \
+deh_bexstr.c                    \
+deh_cheat.c                     \
+deh_doom.c                      \
+deh_frame.c                     \
+deh_misc.c         deh_misc.h   \
+deh_ptr.c                       \
+deh_sound.c                     \
+deh_thing.c                     \
+deh_weapon.c                    \
                    d_englsh.h   \
 d_items.c          d_items.h    \
 d_main.c           d_main.h     \
@@ -61,18 +71,3 @@ st_lib.c           st_lib.h     \
 st_stuff.c         st_stuff.h   \
 wi_stuff.c         wi_stuff.h

-FEATURE_DEHACKED_SOURCE_FILES =            \
-deh_ammo.c                                 \
-deh_bexstr.c                               \
-deh_cheat.c                                \
-deh_doom.c                                 \
-deh_frame.c                                \
-deh_misc.c           deh_misc.h            \
-deh_ptr.c                                  \
-deh_sound.c                                \
-deh_thing.c                                \
-deh_weapon.c
-
-libdoom_a_SOURCES = $(SOURCE_FILES)                   \
-                    $(FEATURE_DEHACKED_SOURCE_FILES)
-
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index cbfc188e..55dd275a 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -31,7 +31,6 @@
 #include "doomstat.h"

 #include "dstrings.h"
-#include "doomfeatures.h"
 #include "sounds.h"

 #include "d_iwad.h"
@@ -377,9 +376,7 @@ void D_BindVariables(void)
     key_multi_msgplayer[2] = HUSTR_KEYBROWN;
     key_multi_msgplayer[3] = HUSTR_KEYRED;

-#ifdef FEATURE_MULTIPLAYER
     NET_BindVariables();
-#endif

     M_BindIntVariable("mouse_sensitivity",      &mouseSensitivity);
     M_BindIntVariable("sfx_volume",             &sfxVolume);
@@ -1232,7 +1229,6 @@ void D_DoomMain (void)
     DEH_printf("Z_Init: Init zone memory allocation daemon. \n");
     Z_Init ();

-#ifdef FEATURE_MULTIPLAYER
     //!
     // @category net
     //
@@ -1289,8 +1285,6 @@ void D_DoomMain (void)
         exit(0);
     }

-#endif
-
     //!
     // @vanilla
     //
@@ -1507,7 +1501,6 @@ void D_DoomMain (void)
         DEH_AddStringReplacement("M_GDLOW", "M_MSGOFF");
     }

-#ifdef FEATURE_DEHACKED
     // Load Dehacked patches specified on the command line with -deh.
     // Note that there's a very careful and deliberate ordering to how
     // Dehacked patches are loaded. The order we use is:
@@ -1515,7 +1508,6 @@ void D_DoomMain (void)
     //  2. Command line dehacked patches specified with -deh.
     //  3. PWAD dehacked patches in DEHACKED lumps.
     DEH_ParseCommandLine();
-#endif

     // Load PWAD files.
     modifiedgame = W_ParseCommandLine();
@@ -1674,10 +1666,8 @@ void D_DoomMain (void)
     I_InitSound(true);
     I_InitMusic();

-#ifdef FEATURE_MULTIPLAYER
     printf ("NET_Init: Init network subsystem.\n");
     NET_Init ();
-#endif

     // Initial netgame startup. Connect to server etc.
     D_ConnectNetGame();
diff --git a/src/doom/d_net.c b/src/doom/d_net.c
index 20f56b27..1a4aebd6 100644
--- a/src/doom/d_net.c
+++ b/src/doom/d_net.c
@@ -19,8 +19,6 @@

 #include <stdlib.h>

-#include "doomfeatures.h"
-
 #include "d_main.h"
 #include "m_argv.h"
 #include "m_menu.h"
diff --git a/src/doom/deh_misc.h b/src/doom/deh_misc.h
index 319a1451..f29428f5 100644
--- a/src/doom/deh_misc.h
+++ b/src/doom/deh_misc.h
@@ -18,8 +18,6 @@
 #ifndef DEH_MISC_H
 #define DEH_MISC_H

-#include "doomfeatures.h"
-
 #define DEH_DEFAULT_INITIAL_HEALTH 100
 #define DEH_DEFAULT_INITIAL_BULLETS 50
 #define DEH_DEFAULT_MAX_HEALTH 200
@@ -37,28 +35,26 @@
 #define DEH_DEFAULT_BFG_CELLS_PER_SHOT 40
 #define DEH_DEFAULT_SPECIES_INFIGHTING 0

-#ifdef FEATURE_DEHACKED
-
-extern int deh_initial_health;
-extern int deh_initial_bullets;
-extern int deh_max_health;
-extern int deh_max_armor;
-extern int deh_green_armor_class;
-extern int deh_blue_armor_class;
-extern int deh_max_soulsphere;
-extern int deh_soulsphere_health;
-extern int deh_megasphere_health;
-extern int deh_god_mode_health;
-extern int deh_idfa_armor;
-extern int deh_idfa_armor_class;
-extern int deh_idkfa_armor;
-extern int deh_idkfa_armor_class;
-extern int deh_bfg_cells_per_shot;
-extern int deh_species_infighting;
+extern int deh_initial_health;
+extern int deh_initial_bullets;
+extern int deh_max_health;
+extern int deh_max_armor;
+extern int deh_green_armor_class;
+extern int deh_blue_armor_class;
+extern int deh_max_soulsphere;
+extern int deh_soulsphere_health;
+extern int deh_megasphere_health;
+extern int deh_god_mode_health;
+extern int deh_idfa_armor;
+extern int deh_idfa_armor_class;
+extern int deh_idkfa_armor;
+extern int deh_idkfa_armor_class;
+extern int deh_bfg_cells_per_shot;
+extern int deh_species_infighting;

-#else
+#if 0

-// If dehacked is disabled, hard coded values
+// To compile without dehacked, it's possible to use these:

 #define deh_initial_health      DEH_DEFAULT_INITIAL_HEALTH
 #define deh_initial_bullets     DEH_DEFAULT_INITIAL_BULLETS
diff --git a/src/doom/deh_sound.c b/src/doom/deh_sound.c
index f3242839..8d178c78 100644
--- a/src/doom/deh_sound.c
+++ b/src/doom/deh_sound.c
@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <stdlib.h>

-#include "doomfeatures.h"
 #include "doomtype.h"
 #include "deh_defs.h"
 #include "deh_main.h"
diff --git a/src/doom/s_sound.c b/src/doom/s_sound.c
index 4f48a3e2..9af5e07e 100644
--- a/src/doom/s_sound.c
+++ b/src/doom/s_sound.c
@@ -21,7 +21,6 @@
 #include "i_sound.h"
 #include "i_system.h"

-#include "doomfeatures.h"
 #include "deh_str.h"

 #include "doomstat.h"
diff --git a/src/doomfeatures.h b/src/doomfeatures.h
deleted file mode 100644
index 7c2d9800..00000000
--- a/src/doomfeatures.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// Copyright(C) 2005-2014 Simon Howard
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// DESCRIPTION:
-//     List of features which can be enabled/disabled to slim down the
-//     program.
-//
-
-#ifndef DOOM_FEATURES_H
-#define DOOM_FEATURES_H
-
-// Enables wad merging (the '-merge' command line parameter)
-
-#define FEATURE_WAD_MERGE 1
-
-// Enables dehacked support ('-deh')
-
-#define FEATURE_DEHACKED 1
-
-// Enables multiplayer support (network games)
-
-#define FEATURE_MULTIPLAYER 1
-
-// Enables sound output
-
-#define FEATURE_SOUND 1
-
-#endif /* #ifndef DOOM_FEATURES_H */
-
-
diff --git a/src/heretic/Makefile.am b/src/heretic/Makefile.am
index 0cf95c8c..273688c3 100644
--- a/src/heretic/Makefile.am
+++ b/src/heretic/Makefile.am
@@ -5,10 +5,17 @@ AM_CFLAGS=-I$(top_srcdir)/src                           \

 noinst_LIBRARIES=libheretic.a

-SOURCE_FILES=                                        \
+libheretic_a_SOURCES =                               \
                        am_data.h                     \
 am_map.c               am_map.h                      \
 ct_chat.c              ct_chat.h                     \
+deh_ammo.c                                           \
+deh_frame.c                                          \
+deh_htext.c                                          \
+deh_htic.c             deh_htic.h                    \
+deh_sound.c                                          \
+deh_thing.c                                          \
+deh_weapon.c                                         \
 d_main.c                                             \
 d_net.c                                              \
                        doomdata.h                    \
@@ -53,15 +60,3 @@ sb_bar.c                                             \
 sounds.c               sounds.h                      \
 s_sound.c              s_sound.h

-FEATURE_DEHACKED_SOURCE_FILES =            \
-deh_ammo.c                                 \
-deh_frame.c                                \
-deh_htext.c                                \
-deh_htic.c             deh_htic.h          \
-deh_sound.c                                \
-deh_thing.c                                \
-deh_weapon.c
-
-libheretic_a_SOURCES=$(SOURCE_FILES)                  \
-                     $(FEATURE_DEHACKED_SOURCE_FILES)
-
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index 3e91a21b..c5d6955a 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -19,8 +19,6 @@
 #include <stdio.h>
 #include <stdlib.h>

-#include "doomfeatures.h"
-
 #include "txt_main.h"
 #include "txt_io.h"

@@ -757,9 +755,7 @@ void D_BindVariables(void)
     M_BindMenuControls();
     M_BindMapControls();

-#ifdef FEATURE_MULTIPLAYER
     NET_BindVariables();
-#endif

     M_BindIntVariable("mouse_sensitivity",      &mouseSensitivity);
     M_BindIntVariable("sfx_volume",             &snd_MaxVolume);
@@ -975,10 +971,8 @@ void D_DoomMain(void)
     D_AddFile(iwadfile);
     W_CheckCorrectIWAD(heretic);

-#ifdef FEATURE_DEHACKED
     // Load dehacked patches specified on the command line.
     DEH_ParseCommandLine();
-#endif

     // Load PWAD files.
     W_ParseCommandLine();
@@ -1084,10 +1078,8 @@ void D_DoomMain(void)
     I_InitSound(false);
     I_InitMusic();

-#ifdef FEATURE_MULTIPLAYER
     tprintf("NET_Init: Init network subsystem.\n", 1);
     NET_Init ();
-#endif

     D_ConnectNetGame();

diff --git a/src/heretic/d_net.c b/src/heretic/d_net.c
index 85f8bfa1..68e12931 100644
--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -19,8 +19,6 @@

 #include <stdlib.h>

-#include "doomfeatures.h"
-
 #include "i_system.h"
 #include "i_timer.h"
 #include "i_video.h"
diff --git a/src/heretic/deh_sound.c b/src/heretic/deh_sound.c
index e779243f..c889cd66 100644
--- a/src/heretic/deh_sound.c
+++ b/src/heretic/deh_sound.c
@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <stdlib.h>

-#include "doomfeatures.h"
 #include "doomtype.h"
 #include "deh_defs.h"
 #include "deh_main.h"
diff --git a/src/hexen/Makefile.am b/src/hexen/Makefile.am
index 74c30950..c2bd1255 100644
--- a/src/hexen/Makefile.am
+++ b/src/hexen/Makefile.am
@@ -2,7 +2,7 @@ AM_CFLAGS=-I$(top_srcdir)/src @SDL_CFLAGS@ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@

 noinst_LIBRARIES=libhexen.a

-SOURCE_FILES=                         \
+libhexen_a_SOURCES =                  \
 a_action.c                            \
                     am_data.h         \
 am_map.c            am_map.h          \
@@ -58,4 +58,3 @@ sv_save.c                             \
                     textdefs.h        \
                     xddefs.h

-libhexen_a_SOURCES=$(SOURCE_FILES)
diff --git a/src/hexen/d_net.c b/src/hexen/d_net.c
index cfaa5897..a2bfb5a6 100644
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -19,8 +19,6 @@

 #include <stdlib.h>

-#include "doomfeatures.h"
-
 #include "m_argv.h"
 #include "i_system.h"
 #include "i_timer.h"
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index b70c2db2..414de069 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -23,7 +23,6 @@
 #include <time.h>

 #include "config.h"
-#include "doomfeatures.h"

 #include "h2def.h"
 #include "ct_chat.h"
@@ -153,9 +152,7 @@ void D_BindVariables(void)
     key_multi_msgplayer[6] = CT_KEY_PLAYER7;
     key_multi_msgplayer[7] = CT_KEY_PLAYER8;

-#ifdef FEATURE_MULTIPLAYER
     NET_BindVariables();
-#endif

     M_BindIntVariable("graphical_startup",      &graphical_startup);
     M_BindIntVariable("mouse_sensitivity",      &mouseSensitivity);
@@ -448,10 +445,8 @@ void D_DoomMain(void)
     I_InitSound(false);
     I_InitMusic();

-#ifdef FEATURE_MULTIPLAYER
     ST_Message("NET_Init: Init networking subsystem.\n");
     NET_Init();
-#endif
     D_ConnectNetGame();

     S_Init();
diff --git a/src/i_sound.c b/src/i_sound.c
index c4dd99d0..b55684cd 100644
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -21,7 +21,6 @@
 #include "SDL_mixer.h"

 #include "config.h"
-#include "doomfeatures.h"
 #include "doomtype.h"

 #include "gusconf.h"
@@ -91,10 +90,8 @@ static int snd_mport = 0;

 static sound_module_t *sound_modules[] =
 {
-#ifdef FEATURE_SOUND
     &sound_sdl_module,
     &sound_pcsound_module,
-#endif
     NULL,
 };

@@ -102,10 +99,8 @@ static sound_module_t *sound_modules[] =

 static music_module_t *music_modules[] =
 {
-#ifdef FEATURE_SOUND
     &music_sdl_module,
     &music_opl_module,
-#endif
     NULL,
 };

@@ -459,9 +454,7 @@ void I_BindSoundVariables(void)
     M_BindStringVariable("gus_patch_path",       &gus_patch_path);
     M_BindIntVariable("gus_ram_kb",              &gus_ram_kb);

-#ifdef FEATURE_SOUND
     M_BindIntVariable("use_libsamplerate",       &use_libsamplerate);
     M_BindFloatVariable("libsamplerate_scale",   &libsamplerate_scale);
-#endif
 }

diff --git a/src/m_config.c b/src/m_config.c
index 165fd551..d45b42eb 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -31,7 +31,6 @@

 #include "doomtype.h"
 #include "doomkeys.h"
-#include "doomfeatures.h"
 #include "i_system.h"
 #include "m_argv.h"
 #include "m_misc.h"
@@ -862,8 +861,6 @@ static default_t extra_defaults_list[] =

     CONFIG_VARIABLE_INT_HEX(opl_io_port),

-#ifdef FEATURE_SOUND
-
     //!
     // Controls whether libsamplerate support is used for performing
     // sample rate conversions of sound effects.  Support for this
@@ -914,8 +911,6 @@ static default_t extra_defaults_list[] =

     CONFIG_VARIABLE_INT(gus_ram_kb),

-#endif
-
     //!
     // @game doom strife
     //
@@ -946,8 +941,6 @@ static default_t extra_defaults_list[] =

     CONFIG_VARIABLE_INT(vanilla_keyboard_mapping),

-#ifdef FEATURE_MULTIPLAYER
-
     //!
     // Name to use in network games for identification.  This is only
     // used on the "waiting" screen while waiting for the game to start.
@@ -955,8 +948,6 @@ static default_t extra_defaults_list[] =

     CONFIG_VARIABLE_STRING(player_name),

-#endif
-
     //!
     // If this is non-zero, the mouse will be "grabbed" when running
     // in windowed mode so that it can be used as an input device.
diff --git a/src/setup/Makefile.am b/src/setup/Makefile.am
index 59fe10c8..2867f8b3 100644
--- a/src/setup/Makefile.am
+++ b/src/setup/Makefile.am
@@ -5,7 +5,7 @@ AM_CFLAGS = @SDL_CFLAGS@                                           \

 noinst_LIBRARIES = libsetup.a

-SOURCE_FILES =                                  \
+libsetup_a_SOURCES =                            \
     compatibility.c   compatibility.h           \
     display.c         display.h                 \
     joystick.c        joystick.h                \
@@ -21,8 +21,6 @@ SOURCE_FILES =                                  \
     txt_keyinput.c    txt_keyinput.h            \
     txt_mouseinput.c  txt_mouseinput.h

-libsetup_a_SOURCES = $(SOURCE_FILES)
-
 EXTRA_DIST=                                     \
     setup_icon.c

diff --git a/src/setup/multiplayer.c b/src/setup/multiplayer.c
index fd17185e..892a1120 100644
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -17,7 +17,6 @@
 #include <string.h>

 #include "doomtype.h"
-#include "doomfeatures.h"

 #include "textscreen.h"

@@ -1137,9 +1136,7 @@ void BindMultiplayerVariables(void)
     char buf[15];
     int i;

-#ifdef FEATURE_MULTIPLAYER
     M_BindStringVariable("player_name", &net_player_name);
-#endif

     for (i=0; i<10; ++i)
     {
diff --git a/src/strife/Makefile.am b/src/strife/Makefile.am
index 82eb346e..7a4718b4 100644
--- a/src/strife/Makefile.am
+++ b/src/strife/Makefile.am
@@ -4,8 +4,17 @@ AM_CFLAGS=-I$(top_srcdir)/src                           \

 noinst_LIBRARIES=libstrife.a

-SOURCE_FILES=                   \
+libstrife_a_SOURCES =           \
 am_map.c           am_map.h     \
+deh_ammo.c                      \
+deh_cheat.c                     \
+deh_strife.c                    \
+deh_frame.c                     \
+deh_misc.c         deh_misc.h   \
+deh_ptr.c                       \
+deh_sound.c                     \
+deh_thing.c                     \
+deh_weapon.c                    \
                    d_englsh.h   \
 d_items.c          d_items.h    \
 d_main.c           d_main.h     \
@@ -64,17 +73,3 @@ st_lib.c           st_lib.h     \
 st_stuff.c         st_stuff.h   \
 wi_stuff.c         wi_stuff.h

-FEATURE_DEHACKED_SOURCE_FILES =            \
-deh_ammo.c                                 \
-deh_cheat.c                                \
-deh_strife.c                               \
-deh_frame.c                                \
-deh_misc.c           deh_misc.h            \
-deh_ptr.c                                  \
-deh_sound.c                                \
-deh_thing.c                                \
-deh_weapon.c
-
-libstrife_a_SOURCES = $(SOURCE_FILES)                   \
-                      $(FEATURE_DEHACKED_SOURCE_FILES)
-
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 41f405b7..3cbbb6dc 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -31,7 +31,6 @@
 #include "doomstat.h"

 #include "dstrings.h"
-#include "doomfeatures.h"
 #include "sounds.h"

 #include "txt_main.h"
@@ -425,9 +424,7 @@ void D_BindVariables(void)
     key_multi_msgplayer[6] = '7';
     key_multi_msgplayer[7] = '8';

-#ifdef FEATURE_MULTIPLAYER
     NET_BindVariables();
-#endif

     // haleyjd 08/29/10: [STRIFE]
     // * Added voice volume
@@ -1517,7 +1514,6 @@ void D_DoomMain (void)
     //DEH_printf("Z_Init: Init zone memory allocation daemon. \n"); [STRIFE] removed
     Z_Init ();

-#ifdef FEATURE_MULTIPLAYER
     //!
     // @category net
     //
@@ -1574,8 +1570,6 @@ void D_DoomMain (void)
         exit(0);
     }

-#endif
-
     //!
     // @vanilla
     //
@@ -1733,10 +1727,8 @@ void D_DoomMain (void)
     D_AddFile(iwadfile);
     W_CheckCorrectIWAD(strife);

-#ifdef FEATURE_DEHACKED
     // Load dehacked patches specified on the command line.
     DEH_ParseCommandLine();
-#endif

     // Load PWAD files.
     modifiedgame = W_ParseCommandLine();
@@ -1837,11 +1829,9 @@ void D_DoomMain (void)
     I_InitSound(true);
     I_InitMusic();

-#ifdef FEATURE_MULTIPLAYER
     if(devparm) // [STRIFE]
         printf ("NET_Init: Init network subsystem.\n");
     NET_Init();
-#endif
     D_ConnectNetGame();

     // haleyjd 20110210: Create Strife hub save folders
diff --git a/src/strife/d_net.c b/src/strife/d_net.c
index ca18eb64..5b05e304 100644
--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -19,8 +19,6 @@

 #include <stdlib.h>

-#include "doomfeatures.h"
-
 #include "d_main.h"
 #include "m_argv.h"
 #include "m_menu.h"
diff --git a/src/strife/deh_misc.h b/src/strife/deh_misc.h
index 319a1451..f29428f5 100644
--- a/src/strife/deh_misc.h
+++ b/src/strife/deh_misc.h
@@ -18,8 +18,6 @@
 #ifndef DEH_MISC_H
 #define DEH_MISC_H

-#include "doomfeatures.h"
-
 #define DEH_DEFAULT_INITIAL_HEALTH 100
 #define DEH_DEFAULT_INITIAL_BULLETS 50
 #define DEH_DEFAULT_MAX_HEALTH 200
@@ -37,28 +35,26 @@
 #define DEH_DEFAULT_BFG_CELLS_PER_SHOT 40
 #define DEH_DEFAULT_SPECIES_INFIGHTING 0

-#ifdef FEATURE_DEHACKED
-
-extern int deh_initial_health;
-extern int deh_initial_bullets;
-extern int deh_max_health;
-extern int deh_max_armor;
-extern int deh_green_armor_class;
-extern int deh_blue_armor_class;
-extern int deh_max_soulsphere;
-extern int deh_soulsphere_health;
-extern int deh_megasphere_health;
-extern int deh_god_mode_health;
-extern int deh_idfa_armor;
-extern int deh_idfa_armor_class;
-extern int deh_idkfa_armor;
-extern int deh_idkfa_armor_class;
-extern int deh_bfg_cells_per_shot;
-extern int deh_species_infighting;
+extern int deh_initial_health;
+extern int deh_initial_bullets;
+extern int deh_max_health;
+extern int deh_max_armor;
+extern int deh_green_armor_class;
+extern int deh_blue_armor_class;
+extern int deh_max_soulsphere;
+extern int deh_soulsphere_health;
+extern int deh_megasphere_health;
+extern int deh_god_mode_health;
+extern int deh_idfa_armor;
+extern int deh_idfa_armor_class;
+extern int deh_idkfa_armor;
+extern int deh_idkfa_armor_class;
+extern int deh_bfg_cells_per_shot;
+extern int deh_species_infighting;

-#else
+#if 0

-// If dehacked is disabled, hard coded values
+// To compile without dehacked, it's possible to use these:

 #define deh_initial_health      DEH_DEFAULT_INITIAL_HEALTH
 #define deh_initial_bullets     DEH_DEFAULT_INITIAL_BULLETS
diff --git a/src/strife/deh_sound.c b/src/strife/deh_sound.c
index f3242839..8d178c78 100644
--- a/src/strife/deh_sound.c
+++ b/src/strife/deh_sound.c
@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <stdlib.h>

-#include "doomfeatures.h"
 #include "doomtype.h"
 #include "deh_defs.h"
 #include "deh_main.h"
diff --git a/src/strife/s_sound.c b/src/strife/s_sound.c
index f7beaace..1de853fc 100644
--- a/src/strife/s_sound.c
+++ b/src/strife/s_sound.c
@@ -22,7 +22,6 @@
 #include "i_sound.h"
 #include "i_system.h"

-#include "doomfeatures.h"
 #include "deh_str.h"

 #include "doomstat.h"
diff --git a/src/w_main.c b/src/w_main.c
index ac67f2dc..fb1be42a 100644
--- a/src/w_main.c
+++ b/src/w_main.c
@@ -17,7 +17,6 @@
 //

 #include "config.h"
-#include "doomfeatures.h"
 #include "d_iwad.h"
 #include "i_system.h"
 #include "m_argv.h"
@@ -33,8 +32,6 @@ boolean W_ParseCommandLine(void)
     boolean modifiedgame = false;
     int p;

-#ifdef FEATURE_WAD_MERGE
-
     // Merged PWADs are loaded first, because they are supposed to be
     // modified IWADs.

@@ -166,8 +163,6 @@ boolean W_ParseCommandLine(void)
         }
     }

-#endif
-
     //!
     // @arg <files>
     // @vanilla