From a3c6daba6e582094897e98c63ccc18ec8097ee5f Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Thu, 2 Jul 2015 10:29:24 -0800 Subject: [PATCH] liblz4 : Moved XXH_NAMESPACE to CPPFLAGS --- Makefile | 2 +- lib/Makefile | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d1b0d0c..b69c930 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ # ################################################################ # Version number -export VERSION=131 +export VERSION=132 export RELEASE=r$(VERSION) DESTDIR?= diff --git a/lib/Makefile b/lib/Makefile index 02ddd3b..de410df 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -31,7 +31,7 @@ # ################################################################ # Version numbers -VERSION ?= 129 +VERSION ?= 132 LIBVER_MAJOR=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h` LIBVER_MINOR=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h` LIBVER_PATCH=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h` @@ -39,8 +39,11 @@ LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH) DESTDIR?= PREFIX ?= /usr/local +CPPFLAGS= -DXXH_NAMESPACE=LZ4_ CFLAGS ?= -O3 -CFLAGS += -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wcast-qual -Wstrict-prototypes -pedantic -DXXH_NAMESPACE=LZ4_ +CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wcast-qual -Wstrict-prototypes -pedantic +LDFLAGS = -I. +FLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) LIBDIR?= $(PREFIX)/lib INCLUDEDIR=$(PREFIX)/include @@ -66,10 +69,10 @@ all: liblz4 liblz4: lz4.c lz4hc.c lz4frame.c xxhash.c @echo compiling static library - @$(CC) $(CPPFLAGS) $(CFLAGS) -c $^ + @$(CC) $(FLAGS) -c $^ @$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o @echo compiling dynamic library $(LIBVER) - @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) + @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) @echo creating versioned links @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) -- 2.7.4