Skip to content

Commit

Permalink
Fix Makefile conflicts for universal binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaglic committed Jun 16, 2021
1 parent 4cdc109 commit cc6cfc1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ CXXFLAGS := -std=c++17 -Wall -Werror
CFLAGS := -std=c++17 -Wno-unused-command-line-argument -Wno-invalid-source-encoding
WXFLAGS := --cxxflags --libs --version=3.1
ARCHFLAG :=
X86FLAG := -target x86_64-apple-macos10.12
X86FLAG := -target x86_64-apple-macos10.11
ARM64FLAG := -target arm64-apple-macos11
MACOS_VERSIONFLAG := -mmacosx-version-min=10.15
MACOS_VERSIONFLAG := -mmacosx-version-min=10.11
INC := -I include

# DEVELOPMENT BUILD
Expand All @@ -57,8 +57,6 @@ release: CFLAGS += $(RELEASEFLAGS)
release: $(TARGET)

# FOR UNIVERSAL BINARY ON MACOS
arm64_app: CXXFLAGS += $(MACOS_VERSIONFLAG)
arm64_app: CFLAGS += $(MACOS_VERSIONFLAG)
arm64_app: ARCHFLAG = $(ARM64FLAG)
arm64_app: $(OBJECTS_ARM64)
@echo "Linking..."
Expand All @@ -70,8 +68,6 @@ $(BUILDDIR_ARM64)/%.o: $(SRCDIR)/%.$(SRCEXT)
mkdir -p $(BUILDDIR_ARM64)
$(CC) $(CFLAGS) $(INC) $(ARCHFLAG) -c `wx-config $(WXFLAGS)` -o $@ $<

x86_app: CXXFLAGS += $(MACOS_VERSIONFLAG)
x86_app: CFLAGS += $(MACOS_VERSIONFLAG)
x86_app: ARCHFLAG = $(X86FLAG)
x86_app: $(OBJECTS_X86)
@echo "Linking..."
Expand Down

0 comments on commit cc6cfc1

Please sign in to comment.