Fix DISCORD_SDK=0 on Linux

This commit is contained in:
MysterD 2022-05-08 17:01:19 -07:00
parent ac8b03aaf2
commit a0700f8e02
1 changed files with 7 additions and 2 deletions

View File

@ -728,7 +728,7 @@ else ifeq ($(WINDOWS_BUILD),1)
LD := $(CXX) LD := $(CXX)
endif endif
else else
LD := $(CROSS)ld LD := $(CXX)
endif endif
AR := $(CROSS)ar AR := $(CROSS)ar
@ -906,17 +906,22 @@ else
LDFLAGS += -Llib/lua/linux -l:liblua53.a LDFLAGS += -Llib/lua/linux -l:liblua53.a
endif endif
# Network # Network/Discord/Bass (ugh, needs cleanup)
ifeq ($(WINDOWS_BUILD),1) ifeq ($(WINDOWS_BUILD),1)
LDFLAGS += -L"ws2_32" -lwsock32 LDFLAGS += -L"ws2_32" -lwsock32
ifeq ($(DISCORD_SDK),1) ifeq ($(DISCORD_SDK),1)
LDFLAGS += -Wl,-Bdynamic -L./lib/discordsdk/ -L./lib/bass/ -ldiscord_game_sdk -lbass -lbass_fx -Wl,-Bstatic LDFLAGS += -Wl,-Bdynamic -L./lib/discordsdk/ -L./lib/bass/ -ldiscord_game_sdk -lbass -lbass_fx -Wl,-Bstatic
else
LDFLAGS += -Wl,-Bdynamic -L./lib/bass/ -lbass -lbass_fx -Wl,-Bstatic
endif endif
else else
ifeq ($(DISCORD_SDK),1) ifeq ($(DISCORD_SDK),1)
LDFLAGS += -ldiscord_game_sdk -lbass -lbass_fx -Wl,-rpath . -Wl,-rpath lib/discordsdk -Wl,-rpath lib/bass LDFLAGS += -ldiscord_game_sdk -lbass -lbass_fx -Wl,-rpath . -Wl,-rpath lib/discordsdk -Wl,-rpath lib/bass
else
LDFLAGS += -lbass -lbass_fx -Wl,-rpath . -Wl,-rpath lib/bass
endif endif
endif endif
# Prevent a crash with -sopt # Prevent a crash with -sopt
export LANG := C export LANG := C