mirror of
https://github.com/shawns-valve/halflife.git
synced 2024-11-22 04:21:30 +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
118 lines
3.5 KiB
Text
118 lines
3.5 KiB
Text
#
|
|
# DMC game library Makefile for x86 Linux
|
|
#
|
|
# May 2001 by Leon Hartwig (hartwig@valvesoftware.com)
|
|
#
|
|
OS:=$(shell uname)
|
|
|
|
DMCDLL_SRC_DIR=$(SOURCE_DIR)/dmc/dlls
|
|
PM_SRC_DIR=$(SOURCE_DIR)/dmc/pm_shared
|
|
|
|
DMCDLL_OBJ_DIR=$(BUILD_OBJ_DIR)/dmcdll
|
|
PM_OBJ_DIR=$(DMCDLL_OBJ_DIR)/pm_shared
|
|
GAME_SHARED_OBJ_DIR=$(DMCDLL_OBJ_DIR)/game_shared
|
|
DMC_OUTPUT_DIR=$(SOURCE_DIR)/../game/dmc
|
|
|
|
#full optimization
|
|
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS)
|
|
|
|
DMCDLL_INCLUDEDIRS=-I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PM_SRC_DIR) -I$(GAME_SHARED_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
PM_INCLUDEDIRS=-I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
GAME_SHARED_INCLUDEDIRS=-I$(DMCDLL_SRC_DIR) -I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
|
|
LDFLAGS=
|
|
|
|
DO_DMCDLL_CC=$(CC) $(DMCDLL_INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
DO_PM_CC=$(CC) $(PM_INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
DO_GAME_SHARED_CC=$(CC) $(GAME_SHARED_INCLUDEDIRS) $(CFLAGS) $(SHLIBFLAGS) -o $@ -c $<
|
|
|
|
#############################################################################
|
|
|
|
DMCDLL_OBJS = \
|
|
$(DMCDLL_OBJ_DIR)/animating.o \
|
|
$(DMCDLL_OBJ_DIR)/animation.o \
|
|
$(DMCDLL_OBJ_DIR)/bmodels.o \
|
|
$(DMCDLL_OBJ_DIR)/buttons.o \
|
|
$(DMCDLL_OBJ_DIR)/cbase.o \
|
|
$(DMCDLL_OBJ_DIR)/client.o \
|
|
$(DMCDLL_OBJ_DIR)/combat.o \
|
|
$(DMCDLL_OBJ_DIR)/doors.o \
|
|
$(DMCDLL_OBJ_DIR)/effects.o \
|
|
$(DMCDLL_OBJ_DIR)/explode.o \
|
|
$(DMCDLL_OBJ_DIR)/func_break.o \
|
|
$(DMCDLL_OBJ_DIR)/func_tank.o \
|
|
$(DMCDLL_OBJ_DIR)/game.o \
|
|
$(DMCDLL_OBJ_DIR)/gamerules.o \
|
|
$(DMCDLL_OBJ_DIR)/globals.o \
|
|
$(DMCDLL_OBJ_DIR)/h_ai.o \
|
|
$(DMCDLL_OBJ_DIR)/h_export.o \
|
|
$(DMCDLL_OBJ_DIR)/lights.o \
|
|
$(DMCDLL_OBJ_DIR)/maprules.o \
|
|
$(DMCDLL_OBJ_DIR)/monsters.o \
|
|
$(DMCDLL_OBJ_DIR)/monsterstate.o \
|
|
$(DMCDLL_OBJ_DIR)/multiplay_gamerules.o \
|
|
$(DMCDLL_OBJ_DIR)/nodes.o \
|
|
$(DMCDLL_OBJ_DIR)/observer.o \
|
|
$(DMCDLL_OBJ_DIR)/pathcorner.o \
|
|
$(DMCDLL_OBJ_DIR)/plane.o \
|
|
$(DMCDLL_OBJ_DIR)/plats.o \
|
|
$(DMCDLL_OBJ_DIR)/player.o \
|
|
$(DMCDLL_OBJ_DIR)/quake_gun.o \
|
|
$(DMCDLL_OBJ_DIR)/quake_items.o \
|
|
$(DMCDLL_OBJ_DIR)/quake_nail.o \
|
|
$(DMCDLL_OBJ_DIR)/quake_player.o \
|
|
$(DMCDLL_OBJ_DIR)/quake_rocket.o \
|
|
$(DMCDLL_OBJ_DIR)/quake_weapons_all.o \
|
|
$(DMCDLL_OBJ_DIR)/schedule.o \
|
|
$(DMCDLL_OBJ_DIR)/singleplay_gamerules.o \
|
|
$(DMCDLL_OBJ_DIR)/skill.o \
|
|
$(DMCDLL_OBJ_DIR)/sound.o \
|
|
$(DMCDLL_OBJ_DIR)/spectator.o \
|
|
$(DMCDLL_OBJ_DIR)/subs.o \
|
|
$(DMCDLL_OBJ_DIR)/teamplay_gamerules.o \
|
|
$(DMCDLL_OBJ_DIR)/threewave_gamerules.o \
|
|
$(DMCDLL_OBJ_DIR)/triggers.o \
|
|
$(DMCDLL_OBJ_DIR)/util.o \
|
|
$(DMCDLL_OBJ_DIR)/weapons.o \
|
|
$(DMCDLL_OBJ_DIR)/world.o
|
|
|
|
PM_OBJS = \
|
|
$(PM_OBJ_DIR)/pm_shared.o \
|
|
$(PM_OBJ_DIR)/pm_math.o \
|
|
$(PM_OBJ_DIR)/pm_debug.o
|
|
|
|
GAME_SHARED_OBJS = \
|
|
$(GAME_SHARED_OBJ_DIR)/voice_gamemgr.o
|
|
|
|
all: dirs dmc.$(SHLIBEXT)
|
|
|
|
dirs:
|
|
-mkdir -p $(BUILD_OBJ_DIR)
|
|
-mkdir -p $(DMCDLL_OBJ_DIR)
|
|
-mkdir -p $(PM_OBJ_DIR)
|
|
-mkdir -p $(GAME_SHARED_OBJ_DIR)
|
|
|
|
dmc.$(SHLIBEXT): $(DMCDLL_OBJS) $(PM_OBJS) $(GAME_SHARED_OBJS)
|
|
$(CLINK) $(SHLIBLDFLAGS) -o $(BUILD_DIR)/$@ $(DMCDLL_OBJS) $(PM_OBJS) $(GAME_SHARED_OBJS) $(LDFLAGS) $(CPP_LIB)
|
|
ifeq ($(CREATE_OUTPUT_DIRS),1)
|
|
mkdir -p $(DMC_OUTPUT_DIR)/dlls
|
|
endif
|
|
$(P4_EDIT_START) .$(DMC_OUTPUT_DIR)/dlls/$@ $(P4_EDIT_END)
|
|
cp $(BUILD_DIR)/$@ $(DMC_OUTPUT_DIR)/dlls
|
|
./gendbg.sh $(DMC_OUTPUT_DIR)/dlls/dmc.$(SHLIBEXT)
|
|
|
|
$(DMCDLL_OBJ_DIR)/%.o : $(DMCDLL_SRC_DIR)/%.cpp
|
|
$(DO_DMCDLL_CC)
|
|
|
|
$(PM_OBJ_DIR)/%.o : $(PM_SRC_DIR)/%.c
|
|
$(DO_PM_CC)
|
|
|
|
$(GAME_SHARED_OBJ_DIR)/%.o : $(GAME_SHARED_SRC_DIR)/%.cpp
|
|
$(DO_GAME_SHARED_CC)
|
|
|
|
clean:
|
|
-rm -rf $(GAME_SHARED_OBJ_DIR)
|
|
-rm -rf $(PM_OBJ_DIR)
|
|
-rm -rf $(DMCDLL_OBJ_DIR)
|
|
-rm -f dmc_$(ARCH).$(SHLIBEXT)
|
|
|