From: Michael Göhler Date: Thu, 30 Oct 2014 20:57:09 +0000 (+0100) Subject: split CFLAGS in CFLAGS and CPPFLAGS, closes #50 X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=commitdiff_plain;h=651b0eba4cdf0afc46f8646f57a9fff4d2d68c5e split CFLAGS in CFLAGS and CPPFLAGS, closes #50 --- diff --git a/src/Makefile b/src/Makefile index 6615a0f..ac4888e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,24 +20,25 @@ UNAME_S := $(shell uname -s 2>/dev/null || echo not) -SOURCES = $(wildcard *.c) -OBJECTS = $(SOURCES:.c=.o) -CFLAGS = -O3 -Wall -I../include +SOURCES = $(wildcard *.c) +OBJECTS = $(SOURCES:.c=.o) +CFLAGS = -O3 -Wall +CPPFLAGS = -I../include ifeq ($(DEBUG),1) - CFLAGS := -O0 -Wall -g -I../include + CFLAGS := -O0 -Wall -g endif ifeq ($(OS),Windows_NT) ifeq (,$(findstring CYGWIN,$(UNAME_S))) - CFLAGS += -DWIN32 + CPPFLAGS += -DWIN32 endif endif ifeq ($(UNAME_S),Linux) LSB_RELEASE := $(shell lsb_release -si 2>/dev/null || echo not) ifneq ($(filter $(LSB_RELEASE),Debian Ubuntu LinuxMint),) - CFLAGS += -I/usr/include/ncursesw + CPPFLAGS += -I/usr/include/ncursesw endif endif