summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-07-02 18:29:24 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-07-02 18:29:24 (GMT)
commita3c6daba6e582094897e98c63ccc18ec8097ee5f (patch)
tree524036394e489240cebcc6ba18949cecc2602494 /lib/Makefile
parentdfabec2d1817e08fda70c19ed9248819b6a1fb22 (diff)
downloadlz4-a3c6daba6e582094897e98c63ccc18ec8097ee5f.zip
lz4-a3c6daba6e582094897e98c63ccc18ec8097ee5f.tar.gz
lz4-a3c6daba6e582094897e98c63ccc18ec8097ee5f.tar.bz2
liblz4 : Moved XXH_NAMESPACE to CPPFLAGS
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile11
1 files changed, 7 insertions, 4 deletions
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)