1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-01-08 10:13:28 +08:00
hl2sdk/linux_sdk/Makefile.plugin

65 lines
1.7 KiB
Makefile

#
# Sample server plugin for SRC engine
#
# October 2004, alfred@valvesoftware.com
#
PLUGIN_SRC_DIR=$(SOURCE_DIR)/utils/serverplugin_sample
COMMON_SRC_DIR=$(SOURCE_DIR)/common
PUBLIC_INC_DIR=$(SOURCE_DIR)/public
TIER0_PUBLIC_SRC_DIR=$(SOURCE_DIR)/public/tier0
TIER1_PUBLIC_SRC_DIR=$(SOURCE_DIR)/public/tier1
TIER1_SRC_DIR=$(SOURCE_DIR)/tier1
PLUGIN_OBJ_DIR=$(BUILD_OBJ_DIR)/plugin
TIER1_OBJ_DIR=$(BUILD_OBJ_DIR)/plugin/tier1
TIER0_OBJ_DIR=$(BUILD_OBJ_DIR)/plugin/tier0
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS)
#DEBUG = -g -ggdb
#CFLAGS+= $(DEBUG)
INCLUDEDIRS=-I$(PUBLIC_INC_DIR) -I$(COMMON_SRC_DIR) -I$(TIER0_PUBLIC_SRC_DIR) -I$(TIER1_PUBLIC_SRC_DIR) -I$(TIER1_SRC_DIR) -Dstrcmpi=strcasecmp -D_alloca=alloca
DO_CC=$(CPLUS) $(INCLUDEDIRS) -w $(CFLAGS) -DARCH=$(ARCH) -o $@ -c $<
#####################################################################
PLUGIN_OBJS = \
$(PLUGIN_OBJ_DIR)/serverplugin_empty.o \
$(PLUGIN_OBJ_DIR)/serverplugin_bot.o \
TIER1_OBJS = \
$(TIER1_OBJ_DIR)/interface.o \
$(TIER1_OBJ_DIR)/KeyValues.o \
$(TIER1_OBJ_DIR)/utlbuffer.o \
TIER0_OBJS = \
$(TIER0_OBJ_DIR)/memoverride.o \
all: dirs serverplugin_empty_$(ARCH).$(SHLIBEXT)
dirs:
-mkdir $(BUILD_OBJ_DIR)
-mkdir $(PLUGIN_OBJ_DIR)
-mkdir $(TIER0_OBJ_DIR)
-mkdir $(TIER1_OBJ_DIR)
$(CHECK_DSP) $(SOURCE_DSP)
serverplugin_empty_$(ARCH).$(SHLIBEXT): $(PLUGIN_OBJS) $(TIER1_OBJS) $(TIER0_OBJS)
$(CLINK) $(DEBUG) -o $(BUILD_DIR)/$@ $(SHLIBLDFLAGS) $(PLUGIN_OBJS) $(TIER1_OBJS) $(TIER0_OBJS) $(CPP_LIB) $(LDFLAGS) $(CPP_LIB)
$(PLUGIN_OBJ_DIR)/%.o: $(PLUGIN_SRC_DIR)/%.cpp
$(DO_CC)
$(TIER1_OBJ_DIR)/%.o: $(TIER1_SRC_DIR)/%.cpp
$(DO_CC)
$(TIER0_OBJ_DIR)/%.o: $(TIER0_PUBLIC_SRC_DIR)/%.cpp
$(DO_CC)
clean:
-rm -rf $(PLUGIN_OBJ_DIR)
-rm -f plugin_$(ARCH).$(SHLIBEXT)