mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
57 lines
1.2 KiB
Makefile
57 lines
1.2 KiB
Makefile
#
|
|
# Tier1 Static Library Makefile
|
|
#
|
|
|
|
override NAME = tier1
|
|
|
|
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 -DTIER1_STATIC_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)/bitbuf.o \
|
|
$(LIB_OBJ_DIR)/commandbuffer.o \
|
|
$(LIB_OBJ_DIR)/generichash.o \
|
|
$(LIB_OBJ_DIR)/rangecheckedvar.o \
|
|
$(LIB_OBJ_DIR)/tier1.o \
|
|
$(LIB_OBJ_DIR)/utlbufferutil.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)
|
|
|