Skip to content

Commit

Permalink
[osx] Ease compiling on Snow Leopard
Browse files Browse the repository at this point in the history
Now compiling on Snow Leopard should be as simple as, for example:
CC=clang++-mp-9.0 CPP=clang++-mp-9.0 OBJCC=clang++-mp-9.0 CPPFLAGS=-stdlib=libc++ OBJCFLAGS=-stdlib=libc++ make
  • Loading branch information
bazz1tv committed Jul 25, 2020
1 parent 7ad3fbf commit 7af3d59
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
10 changes: 5 additions & 5 deletions pc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ SHARED_DIR = shared/
PROJ_DIR = ext
#

CC=$(CROSS_COMPILE)g++
CPP=$(CROSS_COMPILE)g++
OBJCC=$(CROSS_COMPILE)g++
CC ?= $(CROSS_COMPILE)g++
CPP ?= $(CROSS_COMPILE)g++
OBJCC ?= $(CROSS_COMPILE)g++
debug = -g
optimize = -O3

Expand Down Expand Up @@ -259,12 +259,12 @@ $(BIN)/$(DEC7Z): $(PROJ_DIR)/lzma1505/C/Util/7z/$(DEC7Z) $(PROJ_DIR)/lzma1505/C/
cp $(PROJ_DIR)/lzma1505/C/Util/7z/$(DEC7Z) $(BIN)

$(PROJ_DIR)/lzma1505/C/Util/7z/$(DEC7Z):
uname_S=$(uname_S) make -C $(PROJ_DIR)/lzma1505/C/Util/7z -f makefile.gcc
uname_S=$(uname_S) LDFLAGS= CFLAGS= make -C $(PROJ_DIR)/lzma1505/C/Util/7z -f makefile.gcc

$(BIN)/$(UNRAR): $(PROJ_DIR)/unrar/$(UNRAR)
cp $(PROJ_DIR)/unrar/$(UNRAR) $(BIN)
$(PROJ_DIR)/unrar/$(UNRAR):
uname_S=$(uname_S) make -C $(PROJ_DIR)/unrar
uname_S=$(uname_S) CPPFLAGS= LDFLAGS= make -C $(PROJ_DIR)/unrar

$(LIBJDKMIDI_LIB): $(LIBJDKMIDI_OSDIR)/Makefile
cd $(LIBJDKMIDI_OSDIR) && make
Expand Down
6 changes: 4 additions & 2 deletions pc/ext/lzma1505/C/Util/7z/makefile.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ else ifeq ($(uname_S), Cross_Windows)
endif

ifeq ($(uname_S), Darwin)
OSX_BACKSUPPORT = -arch x86_64 -mmacosx-version-min=10.9 \
-DMAC_OS_X_VERSION_MIN_REQUIRED=1090
ifeq ($(OSX_BACKSUPPORT), 1)
OSX_BACKSUPPORT = -arch x86_64 -mmacosx-version-min=10.9 \
-DMAC_OS_X_VERSION_MIN_REQUIRED=1090
endif
CFLAGS += $(OSX_BACKSUPPORT)
LDFLAGS += $(OSX_BACKSUPPORT)
endif
Expand Down
6 changes: 4 additions & 2 deletions pc/ext/unrar/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ else ifeq ($(uname_S), Cross_Windows)
endif

ifeq ($(uname_S), Darwin)
OSX_BACKSUPPORT = -arch x86_64 -mmacosx-version-min=10.9 \
-DMAC_OS_X_VERSION_MIN_REQUIRED=1090
ifeq ($(OSX_BACKSUPPORT), 1)
OSX_BACKSUPPORT = -arch x86_64 -mmacosx-version-min=10.9 \
-DMAC_OS_X_VERSION_MIN_REQUIRED=1090
endif
CXXFLAGS += $(OSX_BACKSUPPORT)
LDFLAGS += $(OSX_BACKSUPPORT)
endif
Expand Down
2 changes: 1 addition & 1 deletion submodules/libgme_m

0 comments on commit 7af3d59

Please sign in to comment.