liblz4 : Moved XXH_NAMESPACE to CPPFLAGS

This commit is contained in:
Yann Collet 2015-07-02 10:29:24 -08:00
parent dfabec2d18
commit a3c6daba6e
2 changed files with 8 additions and 5 deletions

View File

@ -31,7 +31,7 @@
# ################################################################ # ################################################################
# Version number # Version number
export VERSION=131 export VERSION=132
export RELEASE=r$(VERSION) export RELEASE=r$(VERSION)
DESTDIR?= DESTDIR?=

View File

@ -31,7 +31,7 @@
# ################################################################ # ################################################################
# Version numbers # 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_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_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` 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?= DESTDIR?=
PREFIX ?= /usr/local PREFIX ?= /usr/local
CPPFLAGS= -DXXH_NAMESPACE=LZ4_
CFLAGS ?= -O3 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 LIBDIR?= $(PREFIX)/lib
INCLUDEDIR=$(PREFIX)/include INCLUDEDIR=$(PREFIX)/include
@ -66,10 +69,10 @@ all: liblz4
liblz4: lz4.c lz4hc.c lz4frame.c xxhash.c liblz4: lz4.c lz4hc.c lz4frame.c xxhash.c
@echo compiling static library @echo compiling static library
@$(CC) $(CPPFLAGS) $(CFLAGS) -c $^ @$(CC) $(FLAGS) -c $^
@$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o @$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o
@echo compiling dynamic library $(LIBVER) @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 @echo creating versioned links
@ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
@ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT)