diff options
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 198 |
1 files changed, 100 insertions, 98 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 378ad053..9e550e15 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,16 +1,32 @@ +SUBDIRS=doom heretic hexen setup + gamesdir = $(prefix)/games -games_PROGRAMS = chocolate-doom chocolate-server +games_PROGRAMS = @PROGRAM_PREFIX@doom \ + @PROGRAM_PREFIX@heretic \ + @PROGRAM_PREFIX@hexen \ + @PROGRAM_PREFIX@server \ + @PROGRAM_PREFIX@setup + +AM_CFLAGS = -I$(top_builddir)/textscreen \ + -I$(top_builddir)/pcsound \ + @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ -AM_CFLAGS = -I../textscreen -I../pcsound @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ +# Common source files used by absolutely everything: + +COMMON_SOURCE_FILES=\ +i_main.c \ +i_system.c i_system.h \ +m_argv.c m_argv.h \ +m_misc.c m_misc.h + +# Dedicated server (chocolate-server): DEDSERV_FILES=\ d_dedicated.c \ -i_main.c \ +d_mode.c d_mode.h \ i_timer.c i_timer.h \ -m_argv.c m_argv.h \ -m_misc.c m_misc.h \ net_common.c net_common.h \ net_dedicated.c net_dedicated.h \ net_io.c net_io.h \ @@ -20,113 +36,56 @@ net_server.c net_server.h \ net_structrw.c net_structrw.h \ z_native.c z_zone.h -chocolate_server_SOURCES=$(DEDSERV_FILES) -chocolate_server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@ +@PROGRAM_PREFIX@server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES) +@PROGRAM_PREFIX@server_LDADD = $(top_builddir)/wince/libc_wince.a \ + @LDFLAGS@ @SDLNET_LIBS@ -MAIN_SOURCE_FILES=\ -am_map.c am_map.h \ -d_englsh.h \ -d_event.h \ -d_items.c d_items.h \ +# Source files used by the game binaries (chocolate-doom, etc.) + +GAME_SOURCE_FILES=\ +d_event.c d_event.h \ + doomkeys.h \ + doomfeatures.h \ + doomtype.h \ d_iwad.c d_iwad.h \ -d_main.c d_main.h \ -d_net.c d_net.h \ -doomdata.h \ -doomdef.c doomdef.h \ -doomkeys.h \ -doomfeatures.h \ -doomstat.c doomstat.h \ -doomtype.h \ -d_player.h \ -dstrings.c dstrings.h \ -d_textur.h \ -d_think.h \ -d_ticcmd.h \ -f_finale.c f_finale.h \ -f_wipe.c f_wipe.h \ -g_game.c g_game.h \ -hu_lib.c hu_lib.h \ -hu_stuff.c hu_stuff.h \ -i_main.c \ -info.c info.h \ +d_mode.c d_mode.h \ + d_ticcmd.h \ +deh_str.c deh_str.h \ +i_cdmus.c i_cdmus.h \ +i_endoom.c i_endoom.h \ i_joystick.c i_joystick.h \ i_scale.c i_scale.h \ i_swap.h \ -i_system.c i_system.h \ +i_sound.c i_sound.h \ i_timer.c i_timer.h \ i_video.c i_video.h \ -m_argv.c m_argv.h \ +i_videohr.c i_videohr.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 \ -m_menu.c m_menu.h \ -m_misc.c m_misc.h \ md5.c md5.h \ memio.c memio.h \ -m_random.c m_random.h \ -p_ceilng.c \ -p_doors.c \ -p_enemy.c \ -p_floor.c \ -p_inter.c p_inter.h \ -p_lights.c \ -p_local.h \ -p_map.c \ -p_maputl.c \ -p_mobj.c p_mobj.h \ -p_plats.c \ -p_pspr.c p_pspr.h \ -p_saveg.c p_saveg.h \ -p_setup.c p_setup.h \ -p_sight.c \ -p_spec.c p_spec.h \ -p_switch.c \ -p_telept.c \ -p_tick.c p_tick.h \ -p_user.c \ -r_bsp.c r_bsp.h \ -r_data.c r_data.h \ -r_defs.h \ -r_draw.c r_draw.h \ -r_local.h \ -r_main.c r_main.h \ -r_plane.c r_plane.h \ -r_segs.c r_segs.h \ -r_sky.c r_sky.h \ -r_state.h \ -r_things.c r_things.h \ -sounds.c sounds.h \ -s_sound.c s_sound.h \ -st_lib.c st_lib.h \ -st_stuff.c st_stuff.h \ tables.c tables.h \ v_video.c v_video.h \ -wi_stuff.c wi_stuff.h \ + v_patch.h \ w_checksum.c w_checksum.h \ w_wad.c w_wad.h \ w_file.c w_file.h \ w_file_stdc.c \ w_file_posix.c \ w_file_win32.c \ -z_zone.c z_zone.h +z_zone.c z_zone.h # source files needed for FEATURE_DEHACKED -FEATURE_DEHACKED_SOURCE_FILES= \ -deh_ammo.c \ -deh_cheat.c \ +FEATURE_DEHACKED_SOURCE_FILES = \ deh_defs.h \ -deh_frame.c \ deh_io.c deh_io.h \ deh_main.c deh_main.h \ deh_mapping.c deh_mapping.h \ -deh_misc.c deh_misc.h \ -deh_ptr.c \ -deh_sound.c \ -deh_text.c \ -deh_thing.c \ -deh_weapon.c +deh_text.c # source files needed for FEATURE_MULTIPLAYER @@ -157,25 +116,68 @@ i_sdlsound.c \ i_sdlmusic.c \ mus2mid.c mus2mid.h -SOURCE_FILES = $(MAIN_SOURCE_FILES) \ - $(FEATURE_DEHACKED_SOURCE_FILES) \ - $(FEATURE_MULTIPLAYER_SOURCE_FILES) \ +# 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) +SOURCE_FILES_WITH_DEH = $(SOURCE_FILES) \ + $(FEATURE_DEHACKED_SOURCE_FILES) + +EXTRA_LIBS = \ + $(top_builddir)/wince/libc_wince.a \ + $(top_builddir)/textscreen/libtextscreen.a \ + $(top_builddir)/pcsound/libpcsound.a \ + @LDFLAGS@ \ + @SDL_LIBS@ \ + @SDLMIXER_LIBS@ \ + @SDLNET_LIBS@ + if HAVE_WINDRES -chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc +@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES_WITH_DEH) resource.rc else -chocolate_doom_SOURCES=$(SOURCE_FILES) +@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES_WITH_DEH) endif -chocolate_doom_LDADD = \ - ../wince/libc_wince.a \ - ../textscreen/libtextscreen.a \ - ../pcsound/libpcsound.a \ - @LDFLAGS@ \ - @SDLMIXER_LIBS@ \ - @SDLNET_LIBS@ +@PROGRAM_PREFIX@doom_LDADD = doom/libdoom.a $(EXTRA_LIBS) + +if HAVE_WINDRES +@PROGRAM_PREFIX@heretic_SOURCES=$(SOURCE_FILES) resource.rc +else +@PROGRAM_PREFIX@heretic_SOURCES=$(SOURCE_FILES) +endif + +@PROGRAM_PREFIX@heretic_LDADD = heretic/libheretic.a $(EXTRA_LIBS) + +if HAVE_WINDRES +@PROGRAM_PREFIX@hexen_SOURCES=$(SOURCE_FILES) resource.rc +else +@PROGRAM_PREFIX@hexen_SOURCES=$(SOURCE_FILES) +endif + +@PROGRAM_PREFIX@hexen_LDADD = hexen/libhexen.a $(EXTRA_LIBS) + +# Source files needed for chocolate-setup: + +SETUP_FILES= \ +deh_str.c deh_str.h \ +d_mode.c d_mode.h \ +d_iwad.c d_iwad.h \ +m_config.c m_config.h \ +m_controls.c m_controls.h \ +z_native.c z_zone.h + +if HAVE_WINDRES +@PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) setup-res.rc +else +@PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) +endif +@PROGRAM_PREFIX@setup_LDADD = setup/libsetup.a \ + $(top_builddir)/wince/libc_wince.a \ + $(top_builddir)/textscreen/libtextscreen.a \ + @LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@ EXTRA_DIST = \ icon.c \ @@ -188,8 +190,8 @@ EXTRA_DIST = \ if HAVE_PYTHON -icon.c : ../data/doom8.ico - ../data/convert-icon $^ $@ +icon.c : $(top_builddir)/data/doom8.ico + $(top_builddir)/data/convert-icon $^ $@ endif |