Skip to content

Commit

Permalink
Fix libraylib.a included twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Lecrapouille committed May 3, 2024
1 parent 8ea87d9 commit b0c519d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
5 changes: 5 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
5 changes: 0 additions & 5 deletions src/Editor/DearImGui/Makefile.imgui
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
21 changes: 11 additions & 10 deletions src/julia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
#
Expand Down

0 comments on commit b0c519d

Please sign in to comment.