From: Kevin Murray Date: Sun, 13 Nov 2016 23:44:27 +0000 (+1100) Subject: Ensure CPPFLAGS makes it to the compiler X-Git-Tag: archive/raspbian/1.3.3+dfsg-2+rpi1~2^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ddba13e8030d77e1892a85f9ac8e45608387c2d4;p=libzstd.git Ensure CPPFLAGS makes it to the compiler Gbp-Pq: Name 0005-Ensure-CPPFLAGS-makes-it-to-the-compiler.patch --- diff --git a/lib/Makefile b/lib/Makefile index fcc0d09..b0f8289 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -23,9 +23,8 @@ PREFIX ?= /usr/local LIBDIR ?= $(PREFIX)/lib INCLUDEDIR=$(PREFIX)/include -CPPFLAGS+= -I. -I./common -DXXH_NAMESPACE=ZSTD_ -CFLAGS ?= -O3 -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ +CPPFLAGS += -I. -I./common -DXXH_NAMESPACE=ZSTD_ +CFLAGS += -O3 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ -Wpointer-arith CFLAGS += $(MOREFLAGS) @@ -67,17 +66,17 @@ all: lib libzstd.a: ARFLAGS = rcs libzstd.a: $(ZSTD_FILES) @echo compiling static library - @$(CC) $(FLAGS) -c $^ - @$(AR) $(ARFLAGS) $@ *.o + $(CC) $(FLAGS) -c $^ + $(AR) $(ARFLAGS) $@ *.o $(LIBZSTD): LDFLAGS += -shared -fPIC -fvisibility=hidden $(LIBZSTD): $(ZSTD_FILES) @echo compiling dynamic library $(LIBVER) ifneq (,$(filter Windows%,$(OS))) - @$(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -shared $^ -o dll\libzstd.dll + $(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -shared $^ -o dll\libzstd.dll dlltool -D dll\libzstd.dll -d dll\libzstd.def -l dll\libzstd.lib else - @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ @echo creating versioned links @ln -sf $@ libzstd.$(SHARED_EXT_MAJOR) @ln -sf $@ libzstd.$(SHARED_EXT) diff --git a/programs/Makefile b/programs/Makefile index 2b89ddb..3bc5d82 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -27,9 +27,8 @@ else ALIGN_LOOP = endif -CPPFLAGS+= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder -CFLAGS ?= -O3 -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ +CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder +CFLAGS += -O3 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ -Wpointer-arith CFLAGS += $(MOREFLAGS) diff --git a/tests/Makefile b/tests/Makefile index e0f82ad..7051e71 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -28,9 +28,8 @@ PYTHON ?= python3 TESTARTEFACT := versionsTest namespaceTest -CPPFLAGS= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder -I$(PRGDIR) -CFLAGS ?= -O3 -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ +CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder -I$(PRGDIR) +CFLAGS += -O3 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef CFLAGS += $(MOREFLAGS) FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)