diff options
author | Li Jin <dragon-fly@qq.com> | 2021-04-21 09:36:25 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-04-21 09:36:25 +0800 |
commit | b7bdf7d5d36825a1a750a74641f6d374dec5d67a (patch) | |
tree | 6b27eb6590e07c07f378305c51d0f5e0779faa83 /makefile | |
parent | b86e5af605a170a3559df0165eac3cb6b665dc49 (diff) | |
download | yuescript-b7bdf7d5d36825a1a750a74641f6d374dec5d67a.tar.gz yuescript-b7bdf7d5d36825a1a750a74641f6d374dec5d67a.tar.bz2 yuescript-b7bdf7d5d36825a1a750a74641f6d374dec5d67a.zip |
adjust some folder levels.
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -16,7 +16,7 @@ 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) | 19 | INCLUDES = -I $(SRC_PATH) -I $(SRC_PATH)/3rdParty |
20 | # General linker settings | 20 | # General linker settings |
21 | LINK_FLAGS = -lpthread | 21 | LINK_FLAGS = -lpthread |
22 | # Additional release-specific linker settings | 22 | # Additional release-specific linker settings |
@@ -47,8 +47,8 @@ else | |||
47 | ifeq ($(NO_MACRO),true) | 47 | ifeq ($(NO_MACRO),true) |
48 | COMPILE_FLAGS += -DYUE_NO_MACRO | 48 | COMPILE_FLAGS += -DYUE_NO_MACRO |
49 | endif | 49 | endif |
50 | INCLUDES += -I ./src/lua | 50 | INCLUDES += -I $(SRC_PATH)/3rdParty/lua |
51 | LINK_FLAGS += -L ./src/lua -llua -ldl | 51 | LINK_FLAGS += -L $(SRC_PATH)/3rdParty/lua -llua -ldl |
52 | endif | 52 | endif |
53 | 53 | ||
54 | # Add platform related linker flag | 54 | # Add platform related linker flag |
@@ -117,10 +117,10 @@ ifeq ($(SOURCES),) | |||
117 | SOURCES := $(call rwildcard, $(SRC_PATH), *.$(SRC_EXT)) | 117 | SOURCES := $(call rwildcard, $(SRC_PATH), *.$(SRC_EXT)) |
118 | endif | 118 | endif |
119 | 119 | ||
120 | SOURCES := $(filter-out ./src/yue_wasm.cpp, $(SOURCES)) | 120 | SOURCES := $(filter-out $(SRC_PATH)/yue_wasm.cpp, $(SOURCES)) |
121 | 121 | ||
122 | ifeq ($(NO_LUA),true) | 122 | ifeq ($(NO_LUA),true) |
123 | SOURCES := $(filter-out ./src/yuescript/yuescript.cpp, $(SOURCES)) | 123 | SOURCES := $(filter-out $(SRC_PATH)/yuescript/yuescript.cpp, $(SOURCES)) |
124 | endif | 124 | endif |
125 | 125 | ||
126 | # Set the object file names, with the source directory stripped | 126 | # Set the object file names, with the source directory stripped |
@@ -179,7 +179,7 @@ else | |||
179 | @echo "Beginning release build" | 179 | @echo "Beginning release build" |
180 | endif | 180 | endif |
181 | ifneq ($(NO_LUA),true) | 181 | ifneq ($(NO_LUA),true) |
182 | @$(MAKE) generic -C ./src/lua | 182 | @$(MAKE) generic -C $(SRC_PATH)/3rdParty/lua |
183 | endif | 183 | endif |
184 | @$(START_TIME) | 184 | @$(START_TIME) |
185 | @$(MAKE) all --no-print-directory | 185 | @$(MAKE) all --no-print-directory |
@@ -188,9 +188,9 @@ endif | |||
188 | 188 | ||
189 | .PHONY: wasm | 189 | .PHONY: wasm |
190 | wasm: | 190 | wasm: |
191 | @$(MAKE) generic CC='emcc -s WASM=1' AR='emar rcu' RANLIB='emranlib' -C ./src/lua | 191 | @$(MAKE) generic CC='emcc -s WASM=1' AR='emar rcu' RANLIB='emranlib' -C $(SRC_PATH)/3rdParty/lua |
192 | @mkdir -p doc/docs/.vuepress/public/js | 192 | @mkdir -p doc/docs/.vuepress/public/js |
193 | @emcc src/yue_wasm.cpp src/yuescript/ast.cpp src/yuescript/parser.cpp src/yuescript/yue_compiler.cpp src/yuescript/yue_parser.cpp src/yuescript/yuescript.cpp src/lua/liblua.a -s WASM=1 -O2 -o doc/docs/.vuepress/public/js/yuescript.js -Isrc -Isrc/lua -std=c++17 --bind -fexceptions | 193 | @emcc $(SRC_PATH)/yue_wasm.cpp $(SRC_PATH)/yuescript/ast.cpp $(SRC_PATH)/yuescript/parser.cpp $(SRC_PATH)/yuescript/yue_compiler.cpp $(SRC_PATH)/yuescript/yue_parser.cpp $(SRC_PATH)/yuescript/yuescript.cpp $(SRC_PATH)/3rdParty/lua/liblua.a -s WASM=1 -O2 -o doc/docs/.vuepress/public/js/yuescript.js -I $(SRC_PATH) -I $(SRC_PATH)/3rdParty/lua -std=c++17 --bind -fexceptions |
194 | 194 | ||
195 | # Debug build for gdb debugging | 195 | # Debug build for gdb debugging |
196 | .PHONY: debug | 196 | .PHONY: debug |
@@ -201,15 +201,15 @@ else | |||
201 | @echo "Beginning debug build" | 201 | @echo "Beginning debug build" |
202 | endif | 202 | endif |
203 | ifneq ($(NO_LUA),true) | 203 | ifneq ($(NO_LUA),true) |
204 | @$(MAKE) generic -C ./src/lua | 204 | @$(MAKE) generic -C $(SRC_PATH)/3rdParty/lua |
205 | endif | 205 | endif |
206 | @$(START_TIME) | 206 | @$(START_TIME) |
207 | @$(MAKE) all --no-print-directory | 207 | @$(MAKE) all --no-print-directory |
208 | @echo -n "Total build time: " | 208 | @echo -n "Total build time: " |
209 | @$(END_TIME) | 209 | @$(END_TIME) |
210 | 210 | ||
211 | $(BUILD_PATH)/yue.so: src/yuescript/ast.cpp src/yuescript/yue_compiler.cpp src/yuescript/yue_parser.cpp src/yuescript/yuescript.cpp src/yuescript/parser.cpp | 211 | $(BUILD_PATH)/yue.so: $(SRC_PATH)/yuescript/ast.cpp $(SRC_PATH)/yuescript/yue_compiler.cpp $(SRC_PATH)/yuescript/yue_parser.cpp $(SRC_PATH)/yuescript/yuescript.cpp $(SRC_PATH)/yuescript/parser.cpp |
212 | $(CMD_PREFIX)$(CXX) $(CXXFLAGS) -I $(SRC_PATH) -I $(LUAI) -L $(LUAL) -llua -o $@ -fPIC -shared $? | 212 | $(CMD_PREFIX)$(CXX) $(CXXFLAGS) -I $(SRC_PATH) -I $(SRC_PATH)/3rdParty -I $(LUAI) -L $(LUAL) -llua -o $@ -fPIC -shared $? |
213 | 213 | ||
214 | # Standard, non-optimized release build | 214 | # Standard, non-optimized release build |
215 | .PHONY: shared | 215 | .PHONY: shared |
@@ -248,7 +248,7 @@ uninstall: | |||
248 | # Removes all build files | 248 | # Removes all build files |
249 | .PHONY: clean | 249 | .PHONY: clean |
250 | clean: | 250 | clean: |
251 | @$(MAKE) clean -C ./src/lua | 251 | @$(MAKE) clean -C $(SRC_PATH)/3rdParty/lua |
252 | @echo "Deleting $(BIN_NAME) symlink" | 252 | @echo "Deleting $(BIN_NAME) symlink" |
253 | @$(RM) $(BIN_NAME) | 253 | @$(RM) $(BIN_NAME) |
254 | @echo "Deleting directories" | 254 | @echo "Deleting directories" |