diff -urN a/Makefile.mac b/Makefile.mac
--- a/Makefile.mac	2024-02-19 19:55:41.000000000 -0500
+++ b/Makefile.mac	2026-03-07 15:50:09.604110715 -0500
@@ -1,9 +1,10 @@
+prefix=
 CXX=c++
 # FATBINFLAGS=-arch x86_64 -arch i386 -mmacosx-version-min=10.9
 FATBINFLAGS=-arch x86_64 -arch arm64 -mmacosx-version-min=10.9
 THINBINFLAGS=-arch x86_64 -mmacosx-version-min=10.9
 #CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/opt/local/include -I/usr/local/include -I/opt/local/include
-CXXFLAGS=$(FATBINFLAGS) -O2 -Wall -D_FILE_OFFSET_BITS=64 -stdlib=libc++ -I/opt/local/include -I /usr/local/include -I/opt/local/include
+CXXFLAGS=-Wall -D_FILE_OFFSET_BITS=64 -I$(prefix)/include
 LDFLAGS+=
 LDLIBS+= #-licucore
 LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
@@ -17,16 +18,16 @@
 all:	gdisk sgdisk cgdisk fixparts

 gdisk:	$(LIB_OBJS) gpttext.o gdisk.o
-	$(CXX) $(LIB_OBJS) gpttext.o gdisk.o $(FATBINFLAGS) $(LDFLAGS) $(LDLIBS) -o gdisk
+	$(CXX) $(LIB_OBJS) gpttext.o gdisk.o $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) -o gdisk

 cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
-	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(LDLIBS) /usr/local/Cellar/ncurses/6.2/lib/libncurses.dylib -o cgdisk
+	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(LDLIBS) $(prefix)/lib/libncurses.dylib -o cgdisk

 sgdisk: $(LIB_OBJS) gptcl.o sgdisk.o
-	$(CXX) $(LIB_OBJS) gptcl.o sgdisk.o $(LDFLAGS) -L/usr/local/lib $(LDLIBS) -lpopt $(THINBINFLAGS) -o sgdisk
+	$(CXX) $(LIB_OBJS) gptcl.o sgdisk.o $(LDFLAGS) -L$(prefix)/lib $(LDLIBS) -lpopt $(CXXFLAGS) -o sgdisk

 fixparts: $(MBR_LIB_OBJS) fixparts.o
-	$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) $(FATBINFLAGS) -o fixparts
+	$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) $(CXXFLAGS) -o fixparts

