diff --git a/Makefile.common b/Makefile.common index 5aac235..1a79450 100644 --- a/Makefile.common +++ b/Makefile.common @@ -5,6 +5,11 @@ PROJECT = TimedPetriNetEditor STANDARD = --std=c++14 BUILD_TYPE = release +################################################### +# Select the Dear ImGui backend: RayLib or GLFW3. +# +DEAR_IMGUI_BACKEND ?= RayLib + ################################################### # Reduce warnings # diff --git a/src/Editor/DearImGui/Makefile.imgui b/src/Editor/DearImGui/Makefile.imgui index 7a20da3..eb3f1a2 100644 --- a/src/Editor/DearImGui/Makefile.imgui +++ b/src/Editor/DearImGui/Makefile.imgui @@ -1,8 +1,3 @@ -################################################### -# Select the Dear ImGui backend: RayLib or GLFW3. -# -DEAR_IMGUI_BACKEND ?= GLFW3 - ################################################### # If compiling for HTML5 (Emscripten) then force # using Raylib backend since GLFW3 is not compilable. diff --git a/src/julia/Makefile b/src/julia/Makefile index 2f47ca4..975d894 100644 --- a/src/julia/Makefile +++ b/src/julia/Makefile @@ -16,20 +16,11 @@ DESCRIPTION = Timed Petri Net Editor interface for Julia # Location of the project directory and Makefiles # include $(M)/Makefile.header - -################################################### -# Internal libraries since we can call the GUI from Julia REPL -# -LIB_TPNE_CORE = $(abspath $(P)/src/Net/$(BUILD)/libtimedpetrinetcore.a) -LIB_TPNE_GUI = $(abspath $(P)/src/Editor/$(BUILD)/libtimedpetrinetgui.a) -THIRDPART_LIBS += $(LIB_TPNE_GUI) $(LIB_TPNE_CORE) -PKG_LIBS += --static glfw3 -LINKER_FLAGS += -lGL +include $(P)/src/Editor/DearImGui/Makefile.imgui ################################################### # Inform Makefile where to find *.cpp files # -include $(P)/src/Editor/DearImGui/Makefile.imgui VPATH += $(P)/include $(P)/src $(P)/src/Utils $(P)/src/Net VPATH += $(P)/src/Net/Imports VPATH += $(P)/src/Net/Exports @@ -38,6 +29,16 @@ VPATH += $(P)/src/Net/Imports VPATH += $(P)/src/Net/Exports # INCLUDES += -I$(P)/include -I$(P)/src -I$(P)/external +################################################### +# Internal libraries since we can call the GUI from Julia REPL +# +LIB_TPNE_CORE = $(abspath $(P)/src/Net/$(BUILD)/libtimedpetrinetcore.a) +LIB_TPNE_GUI = $(abspath $(P)/src/Editor/$(BUILD)/libtimedpetrinetgui.a) +PKG_LIBS += --static glfw3 +LINKER_FLAGS += -lGL +# WARNING: do not use += since we do not want to include twice libraylib.a +THIRDPART_LIBS := $(LIB_TPNE_GUI) $(LIB_TPNE_CORE) + ################################################### # Make the list of compiled files for the library #