localizebugfix/Makefile

50 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

2015-05-06 14:17:22 +06:00
HLSDK = sdk/hlsdk
METAMOD = sdk/metamod
M_INCLUDE = include
NAME = localizebugfix
COMPILER = /opt/intel/bin/icpc
2015-05-06 14:17:22 +06:00
OBJECTS = main.cpp memory.cpp meta_api.cpp
LINK = -lm -ldl -static-intel -static-libgcc -no-intel-extensions
2015-05-06 14:17:22 +06:00
OPT_FLAGS = -O3 -msse3 -ipo -no-prec-div -fp-model fast=2 -funroll-loops -fomit-frame-pointer -fno-stack-protector
2015-05-06 14:17:22 +06:00
INCLUDE = -I. -I$(M_INCLUDE)/ -I$(HLSDK)/common -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/pm_shared -I$(METAMOD)
2015-05-06 14:17:22 +06:00
BIN_DIR = Release
CFLAGS = $(OPT_FLAGS)
2015-05-06 14:17:22 +06:00
CFLAGS += -g0 -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG -Dlinux -std=c++0x -shared -wd147,274 -fasm-blocks
2015-05-06 14:17:22 +06:00
OBJ_LINUX := $(OBJECTS:%.c=$(BIN_DIR)/%.o)
2015-05-06 14:17:22 +06:00
$(BIN_DIR)/%.o: %.c
$(COMPILER) $(INCLUDE) $(CFLAGS) -o $@ -c $<
2015-05-06 14:17:22 +06:00
all:
mkdir -p $(BIN_DIR)
mkdir -p $(BIN_DIR)/sdk
2015-05-06 14:17:22 +06:00
$(MAKE) $(NAME) && strip -x $(BIN_DIR)/$(NAME)_mm_i386.so
2015-05-06 14:17:22 +06:00
$(NAME): $(OBJ_LINUX)
$(COMPILER) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -o$(BIN_DIR)/$(NAME)_mm_i386.so
check:
cppcheck $(INCLUDE) --quiet --max-configs=100 -D__linux__ -DNDEBUG -DHAVE_STDINT_H .
2015-05-06 14:17:22 +06:00
debug:
$(MAKE) all DEBUG=false
2015-05-06 14:17:22 +06:00
default: all
clean:
rm -rf Release/sdk/*.o
rm -rf Release/*.o
rm -rf Release/$(NAME)_mm_i386.so
rm -rf Debug/sdk/*.o
rm -rf Debug/*.o
rm -rf Debug/$(NAME)_mm_i386.so