Fix Mac + DISCORD_SDK compilation errors

This commit is contained in:
MysterD 2021-08-02 02:59:45 -07:00
parent f9a144b6c1
commit 8642479d82
4 changed files with 7 additions and 3 deletions

View file

@ -465,7 +465,10 @@ ifeq ($(DISCORD_SDK), 1)
endif endif
else ifeq ($(OSX_BUILD),1) else ifeq ($(OSX_BUILD),1)
# needs testing # needs testing
DISCORD_SDK_LIBS := lib/discordsdk/discord_game_sdk.dylib # HACKY! Instead of figuring out all of the dynamic library linking madness...
# I copied the library and gave it two names.
# This really shouldn't be required, but I got tired of trying to do it the "right way"
DISCORD_SDK_LIBS := lib/discordsdk/discord_game_sdk.dylib lib/discordsdk/libdiscord_game_sdk.dylib
else else
DISCORD_SDK_LIBS := lib/discordsdk/libdiscord_game_sdk.so DISCORD_SDK_LIBS := lib/discordsdk/libdiscord_game_sdk.so
endif endif
@ -726,7 +729,7 @@ else ifeq ($(TARGET_RPI),1)
LDFLAGS := $(OPT_FLAGS) -lm $(BACKEND_LDFLAGS) -no-pie LDFLAGS := $(OPT_FLAGS) -lm $(BACKEND_LDFLAGS) -no-pie
else ifeq ($(OSX_BUILD),1) else ifeq ($(OSX_BUILD),1)
LDFLAGS := -lm $(BACKEND_LDFLAGS) -no-pie -lpthread LDFLAGS := -lm $(BACKEND_LDFLAGS) -lpthread
else else
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -no-pie -lpthread LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -no-pie -lpthread

Binary file not shown.

View file

@ -6,6 +6,7 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#define SOCKET unsigned int #define SOCKET unsigned int
#define INVALID_SOCKET (unsigned int)(-1) #define INVALID_SOCKET (unsigned int)(-1)

View file

@ -1,6 +1,6 @@
CC := gcc CC := gcc
CXX := g++ CXX := g++
CFLAGS := -I../include -I. -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s CFLAGS := -I../include -I. -Wall -Wextra -Wno-unused-parameter -Wno-error=implicit-function-declaration -pedantic -std=c99 -O2 -s
LDFLAGS := -lm LDFLAGS := -lm
PROGRAMS := n64graphics n64graphics_ci mio0 n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv PROGRAMS := n64graphics n64graphics_ci mio0 n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv