mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Ajout de la librairie godot linux + ajout makefile
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||||
|
|
||||||
[sub_resource type="GDNativeLibrary" id=1]
|
[sub_resource type="GDNativeLibrary" id=1]
|
||||||
entry/Windows.64 = "res://.script/DungeonAndDeamonScript.dll"
|
entry/Windows.64 = "res://bin/win/DungeonAndDeamonScript.dll"
|
||||||
|
entry/X11.64 = "res://bin/x11/DungeonAndDeamon.so"
|
||||||
dependency/Windows.64 = [ ]
|
dependency/Windows.64 = [ ]
|
||||||
|
dependency/X11.64 = [ ]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
resource_name = "GestionJeu"
|
resource_name = "GestionJeu"
|
||||||
|
|||||||
40
DungeonAndDeamonScript/makefile
Normal file
40
DungeonAndDeamonScript/makefile
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
CC = g++
|
||||||
|
C_FLAGS = -g -Wall -ggdb -fPIC -std=c++14 -Og -m64 -fopenmp
|
||||||
|
LDFLAGS = -shared
|
||||||
|
|
||||||
|
GODOT_PATH = ../GodoBinding/#Chemin des rsrc godot
|
||||||
|
|
||||||
|
EXPORT_LINUX_PATH = $(SRC_PATH)linux/#Chemin du rep linux
|
||||||
|
SRC_PATH = ./DungeonAndDemaonScript/#Chemin des src
|
||||||
|
OBJ_PATH = $(EXPORT_LINUX_PATH)obj/#Chemin de l'export des obj
|
||||||
|
|
||||||
|
#Nom des includes
|
||||||
|
INCLUDE_GODOT = -I$(GODOT_PATH)include -I$(GODOT_PATH)include/gen -I$(GODOT_PATH)include/core -I$(GODOT_PATH)godot_headers -static
|
||||||
|
LIB_GODOT = -L$(GODOT_PATH)lib -lgodot-cpp.linux.debug.64#Nom des libs
|
||||||
|
|
||||||
|
LIB_NAME = $(EXPORT_LINUX_PATH)bin/DungeonAndDeamon.so #Chemin de l'export de la lib
|
||||||
|
LIB_SRC_CPP = $(wildcard $(SRC_PATH)*.cpp)#Recuperation des src .cpp
|
||||||
|
LIB_OBJ = $(addprefix $(OBJ_PATH), $(notdir $(LIB_SRC_CPP:.cpp=.o)))#Recuperation des .obj
|
||||||
|
|
||||||
|
all: init $(LIB_NAME)
|
||||||
|
|
||||||
|
$(LIB_NAME): $(LIB_OBJ)
|
||||||
|
$(CC) $(LDFLAGS) $^ -o $@ $(LIB_GODOT)
|
||||||
|
|
||||||
|
$(OBJ_PATH)%.o: $(SRC_PATH)%.cpp
|
||||||
|
$(CC) $(C_FLAGS) -c $^ $(INCLUDE_GODOT) -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm $(LIB_NAME)
|
||||||
|
|
||||||
|
#Test de si fichier existe / Sinon création
|
||||||
|
init : ./bin ./obj
|
||||||
|
|
||||||
|
./bin :
|
||||||
|
test ! -d $(EXPORT_LINUX_PATH)bin && mkdir $(EXPORT_LINUX_PATH)bin
|
||||||
|
|
||||||
|
./obj :
|
||||||
|
test ! -d $(EXPORT_LINUX_PATH)obj && mkdir $(EXPORT_LINUX_PATH)obj
|
||||||
|
|
||||||
|
super-clean: clean
|
||||||
|
rm $(LIB_OBJ)
|
||||||
BIN
GodoBinding/lib/libgodot-cpp.linux.debug.64.a
Normal file
BIN
GodoBinding/lib/libgodot-cpp.linux.debug.64.a
Normal file
Binary file not shown.
Reference in New Issue
Block a user