aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-10-22 00:09:09 +0800
committerLi Jin <dragon-fly@qq.com>2020-10-22 00:09:09 +0800
commitf6e603cc5bef133e5e368a81f677bea92bc405b5 (patch)
treef065fbdc914b9e5062aeb4b2c2e835b83e0caf10
parentb6725202f4a8cac5f829dac9a72a81f3ff73e787 (diff)
downloadyuescript-f6e603cc5bef133e5e368a81f677bea92bc405b5.tar.gz
yuescript-f6e603cc5bef133e5e368a81f677bea92bc405b5.tar.bz2
yuescript-f6e603cc5bef133e5e368a81f677bea92bc405b5.zip
fix makefile.
-rw-r--r--makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/makefile b/makefile
index 38738e2..307053b 100644
--- a/makefile
+++ b/makefile
@@ -16,9 +16,9 @@ RCOMPILE_FLAGS = -D NDEBUG -O3
16# Additional debug-specific flags 16# Additional debug-specific flags
17DCOMPILE_FLAGS = -D DEBUG 17DCOMPILE_FLAGS = -D DEBUG
18# Add additional include paths 18# Add additional include paths
19INCLUDES = -I $(SRC_PATH) -I ./src/lua 19INCLUDES = -I $(SRC_PATH)
20# General linker settings 20# General linker settings
21LINK_FLAGS = -L ./src/lua -lpthread -llua -ldl 21LINK_FLAGS = -lpthread
22# Additional release-specific linker settings 22# Additional release-specific linker settings
23RLINK_FLAGS = 23RLINK_FLAGS =
24# Additional debug-specific linker settings 24# Additional debug-specific linker settings
@@ -42,12 +42,13 @@ TEST_OUTPUT = ./spec/outputs
42UNAME_S:=$(shell uname -s) 42UNAME_S:=$(shell uname -s)
43 43
44ifeq ($(NO_LUA),true) 44ifeq ($(NO_LUA),true)
45 COMPILE_FLAGS += -DMOONP_NO_MACRO 45 COMPILE_FLAGS += -DMOONP_NO_MACRO -DMOONP_COMPILER_ONLY
46 COMPILE_FLAGS += -DMOONP_COMPILER_ONLY
47else 46else
48ifeq ($(NO_MACRO),true) 47ifeq ($(NO_MACRO),true)
49 COMPILE_FLAGS += -DMOONP_NO_MACRO 48 COMPILE_FLAGS += -DMOONP_NO_MACRO
50endif 49endif
50 INCLUDES += -I ./src/lua
51 LINK_FLAGS += -L ./src/lua -llua -ldl
51endif 52endif
52 53
53# Add platform related linker flag 54# Add platform related linker flag
@@ -115,6 +116,10 @@ ifeq ($(SOURCES),)
115 SOURCES := $(call rwildcard, $(SRC_PATH), *.$(SRC_EXT)) 116 SOURCES := $(call rwildcard, $(SRC_PATH), *.$(SRC_EXT))
116endif 117endif
117 118
119ifeq ($(NO_LUA),true)
120 SOURCES := $(filter-out ./src/MoonP/moonplus.cpp, $(SOURCES))
121endif
122
118# Set the object file names, with the source directory stripped 123# Set the object file names, with the source directory stripped
119# from the path, and the build path prepended in its place 124# from the path, and the build path prepended in its place
120OBJECTS = $(SOURCES:$(SRC_PATH)/%.$(SRC_EXT)=$(BUILD_PATH)/%.o) 125OBJECTS = $(SOURCES:$(SRC_PATH)/%.$(SRC_EXT)=$(BUILD_PATH)/%.o)
@@ -170,7 +175,9 @@ ifeq ($(USE_VERSION), true)
170else 175else
171 @echo "Beginning release build" 176 @echo "Beginning release build"
172endif 177endif
178ifneq ($(NO_LUA),true)
173 @$(MAKE) -C ./src/lua 179 @$(MAKE) -C ./src/lua
180endif
174 @$(START_TIME) 181 @$(START_TIME)
175 @$(MAKE) all --no-print-directory 182 @$(MAKE) all --no-print-directory
176 @echo -n "Total build time: " 183 @echo -n "Total build time: "
@@ -184,7 +191,9 @@ ifeq ($(USE_VERSION), true)
184else 191else
185 @echo "Beginning debug build" 192 @echo "Beginning debug build"
186endif 193endif
194ifneq ($(NO_LUA),true)
187 @$(MAKE) -C ./src/lua 195 @$(MAKE) -C ./src/lua
196endif
188 @$(START_TIME) 197 @$(START_TIME)
189 @$(MAKE) all --no-print-directory 198 @$(MAKE) all --no-print-directory
190 @echo -n "Total build time: " 199 @echo -n "Total build time: "