Fix macOS universal binary builds
This commit is contained in:
parent
285bb3f18e
commit
1c88cc86dc
1 changed files with 3 additions and 1 deletions
4
Makefile
4
Makefile
|
|
@ -3,7 +3,8 @@ PKG_CONFIG ?= pkg-config
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
VERSION := $(shell if [ -d .git ] && which git 2>&1 > /dev/null; then git describe --always | tail -c +2; else echo $$STANDALONE_VERSION; fi)
|
VERSION := $(shell if [ -d .git ] && which git 2>&1 > /dev/null; then git describe --always | tail -c +2; else echo $$STANDALONE_VERSION; fi)
|
||||||
CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(VERSION)\"
|
CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(VERSION)\"
|
||||||
SUFFIX ?=
|
SUFFIX ?=
|
||||||
|
MACOS_SDK = macosx11.1
|
||||||
|
|
||||||
ifeq ($(shell uname -s),Linux)
|
ifeq ($(shell uname -s),Linux)
|
||||||
CFLAGS += $(shell $(PKG_CONFIG) libnl-route-3.0 --cflags)
|
CFLAGS += $(shell $(PKG_CONFIG) libnl-route-3.0 --cflags)
|
||||||
|
|
@ -14,6 +15,7 @@ endif
|
||||||
|
|
||||||
ifeq ($(shell uname -s),Darwin)
|
ifeq ($(shell uname -s),Darwin)
|
||||||
AFL=afl-clang
|
AFL=afl-clang
|
||||||
|
CFLAGS+= -isysroot $(shell xcrun --sdk $(MACOS_SDK) --show-sdk-path)
|
||||||
else
|
else
|
||||||
AFL=afl-gcc
|
AFL=afl-gcc
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue