mirror of
https://github.com/shawns-valve/halflife.git
synced 2024-11-24 13:11:06 +00:00
536998dfb5
- Remove USE_STEAM_RUNTIME checks -- assume we're running in the Steam Runtime "scout" environment - Remove VALVE_NO_AUTO_P4 checks -- assume we're not in a Perforce depot - Add check for CREATE_OUTPUT_DIRS environment variable, which will automatically create the output directory structure - Remove validator.o from the Half-Life client Makefile, as the corresponding source file is no longer present in the SDK
168 lines
5.3 KiB
Text
168 lines
5.3 KiB
Text
#
|
|
# dmc client Makefile for x86 Linux
|
|
#
|
|
#
|
|
|
|
DMC_SRC_DIR=$(SOURCE_DIR)/dmc/cl_dll
|
|
GAME_SHARED_SRC_DIR=$(SOURCE_DIR)/game_shared
|
|
PM_SHARED_SRC_DIR=$(DMC_SRC_DIR)/../pm_shared
|
|
|
|
DMC_OBJ_DIR=$(BUILD_OBJ_DIR)/dmc_client
|
|
PUBLIC_OBJ_DIR=$(DMC_OBJ_DIR)/public
|
|
COMMON_OBJ_DIR=$(DMC_OBJ_DIR)/common
|
|
GAME_SHARED_OBJ_DIR=$(DMC_OBJ_DIR)/game_shared
|
|
PM_SHARED_OBJ_DIR=$(DMC_OBJ_DIR)/pm_shared
|
|
DMC_OUTPUT_DIR=$(SOURCE_DIR)/../game/dmc
|
|
|
|
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -DCLIENT_DLL -DDMC_BUILD -I/usr/include/malloc -D_snwprintf=swprintf \
|
|
-DDISABLE_JUMP_ORIGIN -DDISABLE_VEC_ORIGIN -D_MAX_PATH=PATH_MAX
|
|
|
|
INCLUDEDIRS=-I$(PUBLIC_SRC_DIR) -I../utils/vgui/include -I$(DMC_SRC_DIR)/../dlls \
|
|
-I../engine -I$(COMMON_SRC_DIR) -I../utils/common -I$(DMC_SRC_DIR)/../pm_shared -I$(DMC_SRC_DIR) -I../game_shared -I../external
|
|
|
|
ifeq ($(OS),Darwin)
|
|
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -framework Carbon $(CFG)/vgui.dylib -L. -lSDL2-2.0.0
|
|
else
|
|
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) vgui.so -L. -lSDL2
|
|
endif
|
|
|
|
DO_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $<
|
|
DO_PUBLIC_CC=$(CPLUS) $(COMMON_INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
DO_COMMON_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
DO_PM_SHARED_CC=$(CC) $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
|
|
#####################################################################
|
|
|
|
DMC_OBJS = \
|
|
$(DMC_OBJ_DIR)/ev_common.o \
|
|
$(DMC_OBJ_DIR)/CTF_FlagStatus.o \
|
|
$(DMC_OBJ_DIR)/CTF_HudMessage.o \
|
|
$(DMC_OBJ_DIR)/DMC_Teleporters.o \
|
|
$(DMC_OBJ_DIR)/ev_hldm.o \
|
|
$(DMC_OBJ_DIR)/quake/quake_baseentity.o \
|
|
$(DMC_OBJ_DIR)/quake/quake_events.o \
|
|
$(DMC_OBJ_DIR)/quake/quake_objects.o \
|
|
$(DMC_OBJ_DIR)/quake/quake_weapons.o \
|
|
$(DMC_OBJ_DIR)/studio_util.o \
|
|
$(DMC_OBJ_DIR)/vgui_SpectatorPanel.o \
|
|
$(DMC_OBJ_DIR)/ammo.o \
|
|
$(DMC_OBJ_DIR)/ammo_secondary.o \
|
|
$(DMC_OBJ_DIR)/ammohistory.o \
|
|
$(DMC_OBJ_DIR)/battery.o \
|
|
$(DMC_OBJ_DIR)/cdll_int.o \
|
|
$(DMC_OBJ_DIR)/com_weapons.o \
|
|
$(DMC_OBJ_DIR)/death.o \
|
|
$(DMC_OBJ_DIR)/demo.o \
|
|
$(DMC_OBJ_DIR)/entity.o \
|
|
$(DMC_OBJ_DIR)/events.o \
|
|
$(DMC_OBJ_DIR)/GameStudioModelRenderer.o \
|
|
$(DMC_OBJ_DIR)/geiger.o \
|
|
$(DMC_OBJ_DIR)/health.o \
|
|
$(DMC_OBJ_DIR)/hud.o \
|
|
$(DMC_OBJ_DIR)/hud_msg.o \
|
|
$(DMC_OBJ_DIR)/hud_redraw.o \
|
|
$(DMC_OBJ_DIR)/hud_spectator.o \
|
|
$(DMC_OBJ_DIR)/hud_update.o \
|
|
$(DMC_OBJ_DIR)/hud_servers.o \
|
|
$(DMC_OBJ_DIR)/in_camera.o \
|
|
$(DMC_OBJ_DIR)/input.o \
|
|
$(DMC_OBJ_DIR)/inputw32.o \
|
|
$(DMC_OBJ_DIR)/menu.o \
|
|
$(DMC_OBJ_DIR)/message.o \
|
|
$(DMC_OBJ_DIR)/saytext.o \
|
|
$(DMC_OBJ_DIR)/status_icons.o \
|
|
$(DMC_OBJ_DIR)/statusbar.o \
|
|
$(DMC_OBJ_DIR)/StudioModelRenderer.o \
|
|
$(DMC_OBJ_DIR)/text_message.o \
|
|
$(DMC_OBJ_DIR)/train.o \
|
|
$(DMC_OBJ_DIR)/tri.o \
|
|
$(DMC_OBJ_DIR)/util.o \
|
|
$(DMC_OBJ_DIR)/view.o \
|
|
$(DMC_OBJ_DIR)/voice_status.o \
|
|
$(DMC_OBJ_DIR)/vgui_int.o \
|
|
$(DMC_OBJ_DIR)/vgui_ScorePanel.o \
|
|
$(DMC_OBJ_DIR)/vgui_ServerBrowser.o \
|
|
$(DMC_OBJ_DIR)/vgui_viewport.o \
|
|
$(DMC_OBJ_DIR)/vgui_CustomObjects.o \
|
|
$(DMC_OBJ_DIR)/vgui_MOTDWindow.o \
|
|
$(DMC_OBJ_DIR)/vgui_SchemeManager.o \
|
|
$(DMC_OBJ_DIR)/dlls/quake_weapons_all.o \
|
|
$(DMC_OBJ_DIR)/dlls/quake_gun.o \
|
|
|
|
|
|
PUBLIC_OBJS = \
|
|
$(PUBLIC_OBJ_DIR)/interface.o \
|
|
|
|
COMMON_OBJS = \
|
|
$(COMMON_OBJ_DIR)/parsemsg.o \
|
|
|
|
GAME_SHARED_OBJS = \
|
|
$(GAME_SHARED_OBJ_DIR)/voice_banmgr.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_checkbutton2.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_grid.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_helpers.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_listbox.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_loadtga.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_scrollbar2.o \
|
|
$(GAME_SHARED_OBJ_DIR)/vgui_slider2.o \
|
|
|
|
PM_SHARED_OBJS = \
|
|
$(PM_SHARED_OBJ_DIR)/pm_debug.o \
|
|
$(PM_SHARED_OBJ_DIR)/pm_shared.o \
|
|
$(PM_SHARED_OBJ_DIR)/pm_math.o \
|
|
|
|
|
|
all: client_dmc.$(SHLIBEXT)
|
|
|
|
client_dmc.$(SHLIBEXT): $(DMC_OBJS) $(PUBLIC_OBJS) $(COMMON_OBJS) $(GAME_SHARED_OBJS) $(PM_SHARED_OBJS)
|
|
$(CLINK) -o $(BUILD_DIR)/$@ $(DMC_OBJS) $(PUBLIC_OBJS) $(COMMON_OBJS) $(GAME_SHARED_OBJS) $(PM_SHARED_OBJS) $(LDFLAGS) $(CPP_LIB)
|
|
ifeq ($(CREATE_OUTPUT_DIRS),1)
|
|
mkdir -p $(DMC_OUTPUT_DIR)/cl_dlls
|
|
endif
|
|
$(P4_EDIT_START) $(DMC_OUTPUT_DIR)/cl_dlls/client.$(SHLIBEXT) $(P4_EDIT_END)
|
|
cp $(BUILD_DIR)/$@ $(DMC_OUTPUT_DIR)/cl_dlls/client.$(SHLIBEXT)
|
|
./gendbg.sh $(DMC_OUTPUT_DIR)/cl_dlls/client.$(SHLIBEXT)
|
|
|
|
|
|
$(DMC_OBJ_DIR):
|
|
mkdir -p $(DMC_OBJ_DIR)
|
|
mkdir -p $(DMC_OBJ_DIR)/dlls
|
|
mkdir -p $(DMC_OBJ_DIR)/quake
|
|
|
|
$(PUBLIC_OBJ_DIR):
|
|
mkdir -p $(PUBLIC_OBJ_DIR)
|
|
|
|
$(COMMON_OBJ_DIR):
|
|
mkdir -p $(COMMON_OBJ_DIR)
|
|
|
|
$(GAME_SHARED_OBJ_DIR):
|
|
mkdir -p $(GAME_SHARED_OBJ_DIR)
|
|
|
|
$(PM_SHARED_OBJ_DIR):
|
|
mkdir -p $(PM_SHARED_OBJ_DIR)
|
|
|
|
$(DMC_OBJ_DIR)/%.o: $(DMC_SRC_DIR)/%.cpp $(filter-out $(wildcard $(DMC_OBJ_DIR)), $(DMC_OBJ_DIR))
|
|
$(DO_CC)
|
|
|
|
$(DMC_OBJ_DIR)/%.o: $(DMC_SRC_DIR)/../%.cpp $(filter-out $(wildcard $(DMC_OBJ_DIR)), $(DMC_OBJ_DIR))
|
|
$(DO_CC)
|
|
|
|
$(DMC_OBJ_DIR)/%.o: $(DMC_SRC_DIR)/quake/%.cpp $(filter-out $(wildcard $(DMC_OBJ_DIR)), $(DMC_OBJ_DIR))
|
|
$(DO_CC)
|
|
|
|
$(PUBLIC_OBJ_DIR)/%.o : $(PUBLIC_SRC_DIR)/%.cpp $(filter-out $(wildcard $(PUBLIC_OBJ_DIR)), $(PUBLIC_OBJ_DIR))
|
|
$(DO_PUBLIC_CC)
|
|
|
|
$(COMMON_OBJ_DIR)/%.o : $(COMMON_SRC_DIR)/%.cpp $(filter-out $(wildcard $(COMMON_OBJ_DIR)), $(COMMON_OBJ_DIR))
|
|
$(DO_COMMON_CC)
|
|
|
|
$(GAME_SHARED_OBJ_DIR)/%.o : $(GAME_SHARED_SRC_DIR)/%.cpp $(filter-out $(wildcard $(GAME_SHARED_OBJ_DIR)), $(GAME_SHARED_OBJ_DIR))
|
|
$(DO_COMMON_CC)
|
|
|
|
$(PM_SHARED_OBJ_DIR)/%.o : $(PM_SHARED_SRC_DIR)/%.c $(filter-out $(wildcard $(PM_SHARED_OBJ_DIR)), $(PM_SHARED_OBJ_DIR))
|
|
$(DO_PM_SHARED_CC)
|
|
|
|
|
|
clean:
|
|
-rm -rf $(DMC_OBJ_DIR)
|
|
-rm -f client.$(SHLIBEXT)
|