1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00
hl2sdk/linux_sdk/Makefile.interfaces
Nicholas Hastings 2d1a9237d8 Fix static lib names to match what MM:S expects when building.
This nukes the legacy '_i486' suffix.
2018-06-16 09:49:37 -04:00

52 lines
1018 B
Makefile

#
# Tier1 Static Library Makefile
#
override NAME = interfaces
LIB_SRC_DIR = $(SRC_DIR)/$(NAME)
PUBLIC_SRC_DIR = $(SRC_DIR)/public
TIER0_PUBLIC_SRC_DIR = $(SRC_DIR)/public/tier0
TIER1_PUBLIC_SRC_DIR = $(SRC_DIR)/public/tier1
LIB_OBJ_DIR=$(BUILD_OBJ_DIR)/$(NAME)
# Extension of linux static library
override SHLIBEXT = a
INCLUDEDIRS = -I$(PUBLIC_SRC_DIR) -I$(TIER0_PUBLIC_SRC_DIR) -I$(TIER1_PUBLIC_SRC_DIR) -D_LIB
DO_CC = $(CPLUS) $(INCLUDEDIRS) -DARCH=$(ARCH)
ifeq "$(DEBUG)" "true"
DO_CC += $(DBG_DEFINES) $(DBG_CFLAGS)
else
DO_CC += -DNDEBUG $(CFLAGS)
endif
DO_CC += -o $@ -c $<
#####################################################################
LIB_OBJS= \
$(LIB_OBJ_DIR)/interfaces.o \
all: dirs $(NAME).$(SHLIBEXT)
dirs:
-mkdir -p $(BUILD_OBJ_DIR)
-mkdir -p $(LIB_OBJ_DIR)
$(NAME).$(SHLIBEXT): $(LIB_OBJS)
$(AR) $(LIB_DIR)/$@ $(LIB_OBJS)
$(LIB_OBJ_DIR)/%.o: $(LIB_SRC_DIR)/%.cpp
$(DO_CC)
install:
cp -f $(NAME).$(SHLIBEXT) $(LIB_DIR)/$(NAME).$(SHLIBEXT)
clean:
-rm -rf $(LIB_OBJ_DIR)