makefile.common

来自「这是整套横扫千军3D版游戏的源码」· COMMON 代码 · 共 66 行

COMMON
66
字号
####################################
# Please review compilation options
####################################

# 1. Change this to your compiler (g++ 4.1 is recommended). If you're not using g++, check for equivalent options below.
# Set through Spring SConstruct
#CXX=g++

# 2. Set the correct type for your architecture
# Set through Spring SConstruct too
# 2a: One of:
#STREFLOP_SSE = 1
#STREFLOP_X87 = 1
#STREFLOP_SOFT = 1
# 2b. And optionally:
#STREFLOP_NO_DENORMALS = 1

# 3. Set optimization options. You may add -march=you_cpu here for example
CXXFLAGS = -O3 -pipe -g
#CXXFLAGS = -O0 -pipe -g


############################################################
# Options you may review if using another compiler than g++
############################################################

# 4. Optional, removes false dependency on libm
LDFLAGS=-Wl,--as-needed

# Options for correctness of code.
# -ffloat-store is not needed since the FPU flags are set by the streflop_init functions
CXXFLAGS += -frounding-math -fsignaling-nans -fno-strict-aliasing -mieee-fp -Wall

# The next options should match/select the FPU
ifdef STREFLOP_X87
CXXFLAGS += -mfpmath=387
endif
ifdef STREFLOP_SSE
CXXFLAGS += -mfpmath=sse -msse -msse2
endif


###############################################
# You should not need to change anything below
###############################################

ifdef STREFLOP_X87
CPPFLAGS += -DSTREFLOP_X87=1
endif
ifdef STREFLOP_SSE
CPPFLAGS += -DSTREFLOP_SSE=1
endif
ifdef STREFLOP_SOFT
CPPFLAGS += -DSTREFLOP_SOFT=1
endif
ifdef STREFLOP_NO_DENORMALS
CPPFLAGS += -DSTREFLOP_NO_DENORMALS=1
endif

# Implicit rule for compiling the libm conversion to C++
%.o : %.cpp
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@

# Version for the package name
STREFLOP_VERSION = 0.2

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?