From 71f6dd31484e8b0fa7bdf5d5115f0607a1402cfd Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 26 May 2023 12:24:49 +0800 Subject: [PATCH 2/5] Config: make paths sane --- cfg/global_vars.mk | 4 ++-- cfg/systems/Darwin.mk | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git cfg/global_vars.mk cfg/global_vars.mk index bbb015f..ba0c4bc 100644 --- cfg/global_vars.mk +++ cfg/global_vars.mk @@ -23,7 +23,7 @@ SNDFILES += ToxicRecvMessage.wav ToxicOutgoingCall.wav ToxicIncomingCall.wav SNDFILES += ToxicTransferComplete.wav ToxicTransferStart.wav # Install directories -PREFIX ?= /usr/local +PREFIX ?= @PREFIX@ BINDIR = $(PREFIX)/bin DATADIR = $(PREFIX)/share/toxic MANDIR ?= $(PREFIX)/share/man diff --git cfg/systems/Darwin.mk cfg/systems/Darwin.mk index ca83644..32bacd8 100644 --- cfg/systems/Darwin.mk +++ cfg/systems/Darwin.mk @@ -1,13 +1,11 @@ # Special options for OS X -# This assumes the use of Homebrew. Change the paths if using MacPorts or Fink. -PKG_CONFIG_PATH = $(shell export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/opt/libconfig/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig) +PKG_CONFIG_PATH = $(shell export PKG_CONFIG_PATH=@PREFIX@/lib/pkgconfig) LIBS := $(filter-out ncursesw, $(LIBS)) -# OS X ships a usable, recent version of ncurses, but calls it ncurses not ncursesw. LDFLAGS += -lncurses -lalut -ltoxcore -lcurl -lconfig -lqrencode -lpng -lopenal -g -CFLAGS += -I/usr/local/opt/freealut/include/AL -I/usr/local/opt/glib/include/glib-2.0 -g +CFLAGS += -std=c11 -I@PREFIX@/include/AL -I@PREFIX@/include/glib-2.0 -g OSX_LIBRARIES = -lobjc -lresolv OSX_FRAMEWORKS = -framework Foundation -framework CoreFoundation -framework AVFoundation \