-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
33 lines (24 loc) · 815 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
# Yup, I have them riiight there.
GODOTCPP_PATH ?= ../godot-cpp
GODOT_PATH ?= ../godot
GODOT_BINARY = $(GODOT_PATH)/bin/godot.x11.tools.64
FFI_INCLUDES = $(shell pkg-config --cflags libffi)
INCLUDES= \
-I$(GODOT_PATH)/modules/gdnative/include \
-I$(GODOTCPP_PATH)/include \
-I$(GODOTCPP_PATH)/include/core \
-I$(GODOTCPP_PATH)/include/gen \
-L$(GODOTCPP_PATH)/bin \
$(FFI_INCLUDES)
LIBS = -lgodot-cpp.linux.debug.64 -lstdc++ -lffi -static-libstdc++ -static-libgcc
FLAGS = -ggdb -fPIC
all: foreigner.so
foreigner.so: src/*.cpp src/*.h
gcc -shared src/*.cpp -o foreigner.so $(LIBS) $(INCLUDES) $(FLAGS)
testlib.so: testlib/*.cpp
gcc -shared testlib/*.cpp -o testlib.so
test: foreigner.so testlib.so
$(GODOT_BINARY) --no-window -s test/test.gd
clean:
rm -f *.so
.PHONY: test clean