mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
55 lines
1.5 KiB
Makefile
55 lines
1.5 KiB
Makefile
#
|
|
# Sample server plugin for SRC engine
|
|
#
|
|
# October 2004, alfred@valvesoftware.com
|
|
#
|
|
|
|
PLUGIN_SRC_DIR=$(SOURCE_DIR)/utils/serverplugin_sample
|
|
PUBLIC_SRC_DIR=$(SOURCE_DIR)/public
|
|
TIER0_PUBLIC_SRC_DIR=$(SOURCE_DIR)/public/tier0
|
|
TIER1_PUBLIC_SRC_DIR=$(SOURCE_DIR)/public/tier1
|
|
|
|
PLUGIN_OBJ_DIR=$(BUILD_OBJ_DIR)/plugin
|
|
PUBLIC_OBJ_DIR=$(BUILD_OBJ_DIR)/plugin/public
|
|
TIER0_OBJ_DIR=$(BUILD_OBJ_DIR)/plugin/tier0
|
|
|
|
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS)
|
|
#DEBUG = -g -ggdb
|
|
#CFLAGS+= $(DEBUG)
|
|
|
|
INCLUDEDIRS=-I$(PUBLIC_SRC_DIR) -I$(TIER1_PUBLIC_SRC_DIR) -Dstrcmpi=strcasecmp -D_alloca=alloca
|
|
|
|
DO_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) -DARCH=$(ARCH) -o $@ -c $<
|
|
|
|
#####################################################################
|
|
|
|
PLUGIN_OBJS = \
|
|
$(PLUGIN_OBJ_DIR)/serverplugin_convar.o \
|
|
$(PLUGIN_OBJ_DIR)/serverplugin_empty.o \
|
|
$(PLUGIN_OBJ_DIR)/serverplugin_bot.o \
|
|
|
|
TIER0_OBJS = \
|
|
$(TIER0_OBJ_DIR)/memoverride.o \
|
|
|
|
all: dirs serverplugin_empty_$(ARCH).$(SHLIBEXT)
|
|
|
|
dirs:
|
|
-mkdir -p $(BUILD_OBJ_DIR)
|
|
-mkdir -p $(PLUGIN_OBJ_DIR)
|
|
-mkdir -p $(PUBLIC_OBJ_DIR)
|
|
-mkdir -p $(TIER0_OBJ_DIR)
|
|
$(CHECK_DSP) $(SOURCE_DSP)
|
|
|
|
serverplugin_empty_$(ARCH).$(SHLIBEXT): $(PLUGIN_OBJS) $(TIER0_OBJS)
|
|
$(CLINK) $(DEBUG) -o $(BUILD_DIR)/$@ $(SHLIBLDFLAGS) $(PLUGIN_OBJS) $(TIER0_OBJS) $(PUBLIC_OBJS) $(CPP_LIB) $(LDFLAGS) $(CPP_LIB)
|
|
|
|
$(PLUGIN_OBJ_DIR)/%.o: $(PLUGIN_SRC_DIR)/%.cpp
|
|
$(DO_CC)
|
|
|
|
$(TIER0_OBJ_DIR)/%.o: $(TIER0_PUBLIC_SRC_DIR)/%.cpp
|
|
$(DO_CC)
|
|
|
|
clean:
|
|
-rm -rf $(PLUGIN_OBJ_DIR)
|
|
-rm -f serverplugin_empty_$(ARCH).$(SHLIBEXT)
|