diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-10-22 00:09:09 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-10-22 00:09:09 +0800 |
| commit | f6e603cc5bef133e5e368a81f677bea92bc405b5 (patch) | |
| tree | f065fbdc914b9e5062aeb4b2c2e835b83e0caf10 | |
| parent | b6725202f4a8cac5f829dac9a72a81f3ff73e787 (diff) | |
| download | yuescript-f6e603cc5bef133e5e368a81f677bea92bc405b5.tar.gz yuescript-f6e603cc5bef133e5e368a81f677bea92bc405b5.tar.bz2 yuescript-f6e603cc5bef133e5e368a81f677bea92bc405b5.zip | |
fix makefile.
| -rw-r--r-- | makefile | 17 |
1 files changed, 13 insertions, 4 deletions
| @@ -16,9 +16,9 @@ RCOMPILE_FLAGS = -D NDEBUG -O3 | |||
| 16 | # Additional debug-specific flags | 16 | # Additional debug-specific flags |
| 17 | DCOMPILE_FLAGS = -D DEBUG | 17 | DCOMPILE_FLAGS = -D DEBUG |
| 18 | # Add additional include paths | 18 | # Add additional include paths |
| 19 | INCLUDES = -I $(SRC_PATH) -I ./src/lua | 19 | INCLUDES = -I $(SRC_PATH) |
| 20 | # General linker settings | 20 | # General linker settings |
| 21 | LINK_FLAGS = -L ./src/lua -lpthread -llua -ldl | 21 | LINK_FLAGS = -lpthread |
| 22 | # Additional release-specific linker settings | 22 | # Additional release-specific linker settings |
| 23 | RLINK_FLAGS = | 23 | RLINK_FLAGS = |
| 24 | # Additional debug-specific linker settings | 24 | # Additional debug-specific linker settings |
| @@ -42,12 +42,13 @@ TEST_OUTPUT = ./spec/outputs | |||
| 42 | UNAME_S:=$(shell uname -s) | 42 | UNAME_S:=$(shell uname -s) |
| 43 | 43 | ||
| 44 | ifeq ($(NO_LUA),true) | 44 | ifeq ($(NO_LUA),true) |
| 45 | COMPILE_FLAGS += -DMOONP_NO_MACRO | 45 | COMPILE_FLAGS += -DMOONP_NO_MACRO -DMOONP_COMPILER_ONLY |
| 46 | COMPILE_FLAGS += -DMOONP_COMPILER_ONLY | ||
| 47 | else | 46 | else |
| 48 | ifeq ($(NO_MACRO),true) | 47 | ifeq ($(NO_MACRO),true) |
| 49 | COMPILE_FLAGS += -DMOONP_NO_MACRO | 48 | COMPILE_FLAGS += -DMOONP_NO_MACRO |
| 50 | endif | 49 | endif |
| 50 | INCLUDES += -I ./src/lua | ||
| 51 | LINK_FLAGS += -L ./src/lua -llua -ldl | ||
| 51 | endif | 52 | endif |
| 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)) |
| 116 | endif | 117 | endif |
| 117 | 118 | ||
| 119 | ifeq ($(NO_LUA),true) | ||
| 120 | SOURCES := $(filter-out ./src/MoonP/moonplus.cpp, $(SOURCES)) | ||
| 121 | endif | ||
| 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 |
| 120 | OBJECTS = $(SOURCES:$(SRC_PATH)/%.$(SRC_EXT)=$(BUILD_PATH)/%.o) | 125 | OBJECTS = $(SOURCES:$(SRC_PATH)/%.$(SRC_EXT)=$(BUILD_PATH)/%.o) |
| @@ -170,7 +175,9 @@ ifeq ($(USE_VERSION), true) | |||
| 170 | else | 175 | else |
| 171 | @echo "Beginning release build" | 176 | @echo "Beginning release build" |
| 172 | endif | 177 | endif |
| 178 | ifneq ($(NO_LUA),true) | ||
| 173 | @$(MAKE) -C ./src/lua | 179 | @$(MAKE) -C ./src/lua |
| 180 | endif | ||
| 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) | |||
| 184 | else | 191 | else |
| 185 | @echo "Beginning debug build" | 192 | @echo "Beginning debug build" |
| 186 | endif | 193 | endif |
| 194 | ifneq ($(NO_LUA),true) | ||
| 187 | @$(MAKE) -C ./src/lua | 195 | @$(MAKE) -C ./src/lua |
| 196 | endif | ||
| 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: " |
