2014-03-01 13:26:04 -06:00
|
|
|
#
|
|
|
|
# Source Dedicated Server Main Executable
|
|
|
|
#
|
|
|
|
# November 2004, alfred@valvesoftware.com
|
|
|
|
#
|
|
|
|
|
|
|
|
SRCDS_SRC_DIR = $(SRC_DIR)/dedicated_main
|
|
|
|
SRCDS_OBJ_DIR = $(BUILD_OBJ_DIR)/srcds
|
|
|
|
|
|
|
|
INCLUDEDIRS =
|
|
|
|
LDFLAGS_SRCDS = -lm -ldl
|
|
|
|
|
|
|
|
DO_CC = $(CPLUS) $(INCLUDEDIRS) -DARCH=$(ARCH)
|
|
|
|
|
|
|
|
ifeq "$(DEBUG)" "true"
|
|
|
|
DO_CC += -DWANTS_DEBUGSTR_HACK $(DBG_DEFINES) $(DBG_CFLAGS)
|
|
|
|
else
|
|
|
|
DO_CC += -DWANTS_DEBUGSTR_HACK -DNDEBUG $(CFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
DO_CC += -o $@ -c $<
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
OS := $(shell uname -s)
|
|
|
|
|
|
|
|
ifeq "$(OS)" "Darwin"
|
|
|
|
SRCDS_BIN = srcds_osx
|
|
|
|
LDFLAGS_SRCDS += -mmacosx-version-min=10.7
|
|
|
|
else
|
|
|
|
SRCDS_BIN = srcds_linux
|
2014-03-14 15:01:07 -05:00
|
|
|
LDFLAGS_SRCDS += -lstdc++ -lpthread
|
2014-03-01 13:26:04 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
SRCDS_OBJS = \
|
|
|
|
$(SRCDS_OBJ_DIR)/main.o \
|
|
|
|
|
|
|
|
all: dirs srcds
|
|
|
|
|
|
|
|
dirs:
|
|
|
|
-mkdir -p $(BUILD_OBJ_DIR)
|
|
|
|
-mkdir -p $(SRCDS_OBJ_DIR)
|
|
|
|
|
|
|
|
srcds: $(SRCDS_OBJS)
|
|
|
|
$(CLINK) -m32 -o $(BUILD_DIR)/$(SRCDS_BIN) $(SRCDS_OBJS) $(LDFLAGS_SRCDS)
|
|
|
|
|
|
|
|
$(SRCDS_OBJ_DIR)/%.o: $(SRCDS_SRC_DIR)/%.cpp
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -rf $(SRCDS_OBJ_DIR)
|
|
|
|
-rm -f $(SRCDS_BIN)
|
|
|
|
|