halflife25-sdk/linux/Makefile.ricochetdll

133 lines
4.5 KiB
Text
Raw Permalink Normal View History

2013-08-30 20:34:05 +00:00
#
# 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
2013-08-30 20:34:05 +00:00
#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:
2024-08-21 02:58:27 +00:00
-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)
2013-08-30 20:34:05 +00:00
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/$@
2013-08-30 20:34:05 +00:00
$(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)