Skip to content

Commit

Permalink
Setup rpath for mod-app linux builds
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Nov 1, 2023
1 parent e40c543 commit d081bbd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ CFLAGS += -Winit-self -Wjump-misses-init -Wmissing-prototypes -Wnested-externs -
endif

# libraries
LIBS = $(shell pkg-config --libs jack lilv-0) -lpthread -lm
LIBS = $(shell pkg-config --libs lilv-0)

ifeq ($(MODAPP),1)
LIBS += $(subst -ljack ,-ljackserver ,$(shell pkg-config --libs jack))
ifneq ($(MACOS)$(WINDOWS),true)
LIBS += -Wl,-rpath,'$$ORIGIN/..'
endif
else
LIBS += $(shell pkg-config --libs jack)
endif

# include paths
INCS = $(shell pkg-config --cflags jack lilv-0)
Expand Down Expand Up @@ -93,6 +102,8 @@ LIBS += $(shell pkg-config --libs hylia)
INCS += $(shell pkg-config --cflags hylia) -DHAVE_HYLIA
endif

LIBS += -lpthread -lm

# incompatible flags
MACHINE = $(shell $(CC) -dumpmachine)
ifneq (,$(findstring mingw,$(MACHINE)))
Expand Down

0 comments on commit d081bbd

Please sign in to comment.