Do not use -Werror. It can cause build failure when different compilers
are used than the ones the developer tested.

Append to CFLAGS rather than overwriting what MacPorts already set.

Use CPPFLAGS when compiling and use LDFLAGS when linking to ensure we
find MacPorts ncurses.
--- Makefile.orig	2020-10-03 05:49:53.000000000 -0500
+++ Makefile	2022-04-25 23:53:09.000000000 -0500
@@ -4,9 +4,9 @@
 #OptDbg=-O3 -march=pentium2
 OptDbg=-ggdb
 ifndef CWFLAGS
-CWFLAGS=-Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
+CWFLAGS=-Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
 endif
-CFLAGS=$(OptDbg) -I. $(CWFLAGS)
+CFLAGS+=$(OptDbg) -I. $(CWFLAGS)
 
 PREFIX  = /usr
 # STRIP = -s
@@ -46,7 +46,7 @@
 
 
 $(BIN)/wiggle : $(BOBJ) $(O)/libwiggle.a
-	$(QUIET_LINK)$(CC) $(CFLAGS) $^ $(LDLIBS) -o $@
+	$(QUIET_LINK)$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS) -o $@
 
 $(O)/libwiggle.a : $(BLIBOBJ)
 	$(QUIET_AR)ar cr $@ $^
@@ -57,7 +57,7 @@
 
 $(BOBJ) $(BLIBOBJ) :: $(O)/%.o : %.c
 	@mkdir -p $(dir $@)
-	$(QUIET_CC)$(CC) $(CFLAGS) -c -o $@ $<
+	$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 VERSION = $(shell [ -d .git ] && git 2> /dev/null describe HEAD)
 VERS_DATE = $(shell [ -d .git ] && git 2> /dev/null log -n1 --format=format:%cd --date=short)
