Skip to content

Commit

Permalink
Update makefile for macOS compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sunt05 committed Dec 16, 2023
1 parent 59ec1b5 commit 9b72b67
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/supy_driver/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@ CFLAGS = -fPIC # ==> universal for ifort, gfortran, pgi
#=======================================================================

UNAME = $(shell uname)
ifeq (${UNAME}, Darwin)
ifeq ($(UNAME), Darwin)
LIBTOOL = libtool -static -o
CFLAGS += -fbracket-depth=1024 -D_POSIX_C_SOURCE=200809L
# Check if gcc is an alias to clang
ifeq ($(shell $(CC) --version | grep -q clang; echo $$?), 0)
$(info gcc is an alias to clang)
CFLAGS += -fbracket-depth=1024
else
$(info gcc is GNU Compiler Collection)
endif
CFLAGS += -D_POSIX_C_SOURCE=200809L
CFLAGS += $(ARCH_FLAGS)
else
LIBTOOL = ar src
endif


# ARCH := $(shell uname -m)
# ifeq ($(ARCH), arm64)
# ARCH_FLAGS = -arch arm64
Expand Down

0 comments on commit 9b72b67

Please sign in to comment.