diff options
author | jmpoep <OriginalEntryPoint@qq.com> | 2023-12-07 16:51:07 +0800 |
---|---|---|
committer | jmpoep <OriginalEntryPoint@qq.com> | 2023-12-07 16:51:07 +0800 |
commit | 28008a746a31abb7909dd86cb0cd413ac8943b0b (patch) | |
tree | a30b74b8cad548048c3c1551d652828ab76fa9bd /lin_common.mak | |
download | vmprotect-3.5.1-master.tar vmprotect-3.5.1-master.tar.gz vmprotect-3.5.1-master.tar.bz2 vmprotect-3.5.1-master.zip |
Diffstat (limited to 'lin_common.mak')
-rw-r--r-- | lin_common.mak | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lin_common.mak b/lin_common.mak new file mode 100644 index 0000000..f32f992 --- /dev/null +++ b/lin_common.mak @@ -0,0 +1,36 @@ +#WARN: no incremental build supported yet (use 'all' target carefully) + +.PHONY: clean all rebuild + +BIN_TARGET := $(BIN_DIR)/$(TARGET) + +CC := clang +CXX := clang++ +LINK := clang++ +CFLAGS := $(CFLAGS) -pipe -fvisibility=hidden -DNDEBUG -O3 -gdwarf-2 -target $(ARCH) -Wall -W -fPIC $(DEFINES) +CXXFLAGS := $(CXXFLAGS) $(CFLAGS) -std=c++11 -fvisibility-inlines-hidden -fno-stack-protector -fno-builtin -Wno-reorder -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Werror +LFLAGS := $(LFLAGS) -Wl,--as-needed -std=c++11 -target $(ARCH) +SDK_LIBS := +SLIBFLAGS := -crs +COPY_FILE := cp -f +COPY_DIR := cp -f -R + +DEL_FILE := rm -f +DEL_DIR := rm -rf -- + +HPCH := precompiled.h +PCH_CPP := $(PCH_DIR)/$(HPCH).gch +INCFLAGS := -I ./ $(INCFLAGS) + +.PRECIOUS: %/.sentinel +%/.sentinel: + test -e $(abspath $@) || (mkdir -p $(abspath ${@D}/) && touch $(abspath $@)) + +rebuild: clean all + +.SUFFIXES: + +all:: $(BIN_TARGET) + +$(PCH_CPP): precompiled.h $(PCH_DIR)/.sentinel + $(CXX) $(CXXFLAGS) $(INCFLAGS) -x c++-header -c precompiled.cc -o $(PCH_CPP) |