More useful CFLAGS.
authorTimo Korvola <tkorvola@iki.fi>
Fri, 9 Mar 2018 21:51:09 +0000 (23:51 +0200)
committerDavid Griffith <dave@661.org>
Sun, 11 Mar 2018 11:48:51 +0000 (04:48 -0700)
Comment away -Wextra: it produces too many false positives for
regular use.  Aim for ISO C instead of GNU (still 99 vintage).
strdup is just too handy though: bring it in from POSIX 2008.
Curses sound uses pthreads, compile accordingly.

Makefile

index 30d187e840f624405b36705facf11440e1d3c22a..b7bb0aea056c75f220e64fddd8c29941b0720774 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,10 @@ endif
 export CFLAGS
 
 # Enable compiler warnings. This is an absolute minimum.
-CFLAGS += -Wall -Wextra -std=gnu99
+CFLAGS += -Wall -std=c99 #-Wextra 
+
+# strdup, strndup
+CFLAGS += -D_POSIX_C_SOURCE=200809L
 
 # Define your optimization flags.
 #
@@ -66,6 +69,7 @@ DEFAULT_CONVERTER ?= SRC_SINC_MEDIUM_QUALITY
 
 ifeq ($(SOUND), ao)
        LDFLAGS += -lao -ldl -lpthread -lm -lsndfile -lvorbisfile -lmodplug -lsamplerate
+       CFLAGS += -pthread
 else ifeq ($(SOUND), none)
        CFLAGS += -DNO_SOUND
 else ifndef SOUND