From 81c9db7a1548fa8eb132aaefc47367fbaa6a42d3 Mon Sep 17 00:00:00 2001
From: Grant Limberg <grant.limberg@zerotier.com>
Date: Tue, 18 Aug 2020 11:46:29 -0700
Subject: [PATCH] fix libs for non-controller builds on macOS

---
 make-mac.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/make-mac.mk b/make-mac.mk
index acf17dd42..f44acabe3 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -28,12 +28,13 @@ include objects.mk
 ONE_OBJS+=osdep/MacEthernetTap.o osdep/MacKextEthernetTap.o osdep/MacDNSHelper.o ext/http-parser/http_parser.o
 
 ifeq ($(ZT_CONTROLLER),1)
-	LIBS+=-L/usr/local/opt/libpq/lib -lpq ext/redis-plus-plus-1.1.1/install/macos/lib/libredis++.a ext/hiredis-0.14.1/lib/macos/libhiredis.a -framework SystemConfiguration -framework CoreFoundation
+	LIBS+=-L/usr/local/opt/libpq/lib -lpq ext/redis-plus-plus-1.1.1/install/macos/lib/libredis++.a ext/hiredis-0.14.1/lib/macos/libhiredis.a
 	DEFS+=-DZT_CONTROLLER_USE_LIBPQ -DZT_CONTROLLER_USE_REDIS -DZT_CONTROLLER 
 	INCLUDES+=-I/usr/local/opt/libpq/include -Iext/hiredis-0.14.1/include/ -Iext/redis-plus-plus-1.1.1/install/macos/include/sw/
-	
 endif
 
+LIBS+=-framework SystemConfiguration -framework CoreFoundation
+
 # Official releases are signed with our Apple cert and apply software updates by default
 ifeq ($(ZT_OFFICIAL_RELEASE),1)
 	DEFS+=-DZT_SOFTWARE_UPDATE_DEFAULT="\"apply\""