added build support for older versions of Mac OS X
authorHolger Schemel <info@artsoft.org>
Tue, 14 Jul 2020 18:17:45 +0000 (20:17 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 14 Jul 2020 18:17:45 +0000 (20:17 +0200)
src/Makefile

index da479a447fabfb9b51eac29568089292ee5817eb..70fb390f18d84e966bda5cd583fc35fdb611ec58 100644 (file)
@@ -57,6 +57,16 @@ PROGNAME = ../$(PROGBASE).exe
 EXTRA_LDFLAGS = -lshfolder -lwsock32
 endif
 
+ifdef BUILD_DIST                       # distribution build
+ifeq ($(shell uname -s),Darwin)                # compiling on Mac OS X
+MAC_TARGET_VERSION_MIN = 10.7
+EXTRA_FLAGS_MAC = -mmacosx-version-min=$(MAC_TARGET_VERSION_MIN)
+EXTRA_CFLAGS = $(EXTRA_FLAGS_MAC)
+EXTRA_LDFLAGS = $(EXTRA_FLAGS_MAC)
+MACOSX_DEPLOYMENT_TARGET = $MAC_TARGET_VERSION_MIN
+endif
+endif
+
 
 # -----------------------------------------------------------------------------
 # configuring target