mirror of
https://github.com/shawns-valve/halflife.git
synced 2024-11-24 21:21:15 +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
132 lines
4.5 KiB
Text
132 lines
4.5 KiB
Text
#
|
|
# Ricochet game library Makefile for x86 Linux
|
|
#
|
|
# June 2001 by Leon Hartwig (hartwig@valvesoftware.com)
|
|
#
|
|
OS:=$(shell uname)
|
|
|
|
RICOCHETDLL_SRC_DIR=$(SOURCE_DIR)/ricochet/dlls
|
|
RICOCHETWPN_SRC_DIR=$(RICOCHETDLL_SRC_DIR)/wpn_shared
|
|
PM_SRC_DIR=$(SOURCE_DIR)/ricochet/pm_shared
|
|
|
|
RICOCHETDLL_OBJ_DIR=$(BUILD_OBJ_DIR)/ricochetdll
|
|
RICOCHETWPN_OBJ_DIR=$(RICOCHETDLL_OBJ_DIR)/wpn_shared
|
|
PM_OBJ_DIR=$(RICOCHETDLL_OBJ_DIR)/pm_shared
|
|
GAME_SHARED_OBJ_DIR=$(RICOCHETDLL_OBJ_DIR)/game_shared
|
|
RICOCHET_OUTPUT_DIR=$(SOURCE_DIR)/../game/ricochet
|
|
|
|
#CFLAGS=$(BASE_CFLAGS) -g
|
|
CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -fno-strength-reduce
|
|
|
|
RICOCHETDLL_INCLUDEDIRS=-I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PM_SRC_DIR) -I$(GAME_SHARED_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
RICOCHETWPN_INCLUDEDIRS=-I$(RICOCHETDLL_SRC_DIR) -I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PM_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
PM_INCLUDEDIRS=-I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
GAME_SHARED_INCLUDEDIRS=-I$(RICOCHETDLL_SRC_DIR) -I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
|
|
|
LDFLAGS=
|
|
|
|
DO_RICOCHETDLL_CC=$(CC) $(RICOCHETDLL_INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
|
DO_RICOCHETWPN_CC=$(CC) $(RICOCHETWPN_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 $<
|
|
|
|
#####################################################################
|
|
|
|
RICOCHETDLL_OBJS = \
|
|
$(RICOCHETDLL_OBJ_DIR)/airtank.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/animating.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/animation.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/bmodels.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/buttons.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/cbase.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/client.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/combat.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/disc_arena.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/disc_powerups.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/doors.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/effects.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/explode.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/func_break.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/func_tank.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/game.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/gamerules.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/ggrenade.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/globals.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/h_ai.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/h_battery.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/h_cycler.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/h_export.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/healthkit.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/items.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/lights.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/maprules.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/mortar.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/mpstubb.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/multiplay_gamerules.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/observer.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/pathcorner.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/plane.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/plats.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/player.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/singleplay_gamerules.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/skill.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/sound.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/soundent.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/spectator.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/subs.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/teamplay_gamerules.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/triggers.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/util.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/weapons.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/world.o \
|
|
$(RICOCHETDLL_OBJ_DIR)/xen.o
|
|
|
|
RICOCHETWPN_OBJS = \
|
|
$(RICOCHETWPN_OBJ_DIR)/disc_weapon_disc.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 ricochet.$(SHLIBEXT)
|
|
|
|
dirs:
|
|
-mkdir -p $(BUILD_OBJ_DIR)
|
|
-mkdir -p $(RICOCHETDLL_OBJ_DIR)
|
|
-mkdir -p $(RICOCHETWPN_OBJ_DIR)
|
|
-mkdir -p $(PM_OBJ_DIR)
|
|
-mkdir -p $(GAME_SHARED_OBJ_DIR)
|
|
|
|
ricochet.$(SHLIBEXT): $(RICOCHETDLL_OBJS) $(RICOCHETWPN_OBJS) $(PM_OBJS) $(GAME_SHARED_OBJS)
|
|
$(CLINK) $(SHLIBLDFLAGS) -o $(BUILD_DIR)/$@ $(RICOCHETDLL_OBJS) $(RICOCHETWPN_OBJS) $(PM_OBJS) $(GAME_SHARED_OBJS) $(LDFLAGS) $(CPP_LIB)
|
|
ifeq ($(CREATE_OUTPUT_DIRS),1)
|
|
mkdir -p $(RICOCHET_OUTPUT_DIR)/dlls
|
|
endif
|
|
$(P4_EDIT_START) $(RICOCHET_OUTPUT_DIR)/dlls/$@ $(P4_EDIT_END)
|
|
cp $(BUILD_DIR)/$@ $(RICOCHET_OUTPUT_DIR)/dlls
|
|
./gendbg.sh $(RICOCHET_OUTPUT_DIR)/dlls/$@
|
|
|
|
$(RICOCHETWPN_OBJ_DIR)/%.o : $(RICOCHETWPN_SRC_DIR)/%.cpp
|
|
$(DO_RICOCHETWPN_CC)
|
|
|
|
$(RICOCHETDLL_OBJ_DIR)/%.o : $(RICOCHETDLL_SRC_DIR)/%.cpp
|
|
$(DO_RICOCHETDLL_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 $(RICOCHETWPN_OBJ_DIR)
|
|
-rm -rf $(RICOCHETDLL_OBJ_DIR)
|
|
-rm -f ricochet_$(ARCH).$(SHLIBEXT)
|
|
-rm -f ricochet.$(SHLIBEXT)
|
|
|