-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
37 lines (25 loc) · 878 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#BattleCore
#makefile for g++ linux
CC=g++
CFLAGS=-Wall
LUA_INCLUDE_PATH = -I/home/shrekshao/Downloads/lua-5.2.3/install/include/
LUA_LIB_PATH = -L/home/shrekshao/Downloads/lua-5.2.3/install/lib/
LIBS = -llua
SRC_DIR = .
VPATH = $(SRC_DIR)
VPATH += $(SRC_DIR)/Basic_Battle
VPATH += $(SRC_DIR)/Basic_Battle/Robot
VPATH += $(SRC_DIR)/Basic_Battle/Robot/Bullet
VPATH += $(SRC_DIR)/Basic_Battle/Robot/Engine
VPATH += $(SRC_DIR)/Basic_Battle/Robot/Weapon
SRC_FILES = $(foreach n, $(VPATH), $(wildcard $(n)/*.cpp))
OUTPUT_DIR = .
all:
$(CC) -O2 -fPIC -shared -o $(OUTPUT_DIR)/libBattleCore.so $(LUA_INCLUDE_PATH) $(LUA_LIB_PATH) $(LIBS) $(SRC_FILES)
copylib: libBattleCore.so
sudo rm /usr/lib/libBattleCore.so
sudo cp libBattleCore.so /usr/lib/libBattleCore.so
setsopath:
touch /etc/ld.so.conf.d/BattleCore.conf
pwd > /etc/ld.so.conf.d/BattleCore.conf
sudo ldconfig