From: Timo Korvola Date: Fri, 9 Mar 2018 21:51:09 +0000 (+0200) Subject: More useful CFLAGS. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=9e8d09e8d49769b9f889bb62d7a89035eb2e3d3a;p=liskon_frotz.git More useful CFLAGS. 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. --- diff --git a/Makefile b/Makefile index 30d187e..b7bb0ae 100644 --- 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