diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | programs/Makefile | 23 |
3 files changed, 22 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index 472ca18..fea2b3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: c compiler: gcc -script: make test +script: make test-travis before_install: - sudo apt-get update -qq - sudo apt-get install -qq gcc-multilib @@ -41,7 +41,8 @@ LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH) DESTDIR= PREFIX = /usr CC := $(CC) -CFLAGS+= -I. -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\" +CFLAGS?= -O3 +CFLAGS+= -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\" LIBDIR?= $(PREFIX)/lib INCLUDEDIR=$(PREFIX)/include @@ -93,10 +94,10 @@ lz4programs: lz4.c lz4hc.c liblz4: lz4.c lz4hc.c @echo compiling static library - @$(CC) $(CFLAGS) -c $^ + @$(CC) $(CPPFLAGS) $(CFLAGS) -c $^ @$(AR) rcs liblz4.a lz4.o lz4hc.o @echo compiling dynamic library - @$(CC) $(CFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) + @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -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) @@ -158,7 +159,10 @@ dist: clean @sha1sum $(DISTRIBNAME) > $(DISTRIBNAME).sha1 @echo Distribution $(DISTRIBNAME) built -test: lz4programs +test: + @cd $(PRGDIR); $(MAKE) -e $@ + +test-travis: lz4programs @cd $(PRGDIR); $(MAKE) -e $@ endif diff --git a/programs/Makefile b/programs/Makefile index 5127c5d..09df341 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -30,27 +30,28 @@ # fullbench32: Same as fullbench, but forced to compile in 32-bits mode # ########################################################################## -RELEASE=rc120 +RELEASE=r120 DESTDIR= PREFIX=/usr CC:=$(CC) -CFLAGS+= -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\" -FLAGS= -I.. $(CFLAGS) +CFLAGS?= -O3 +CFLAGS+= -std=c99 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\" +FLAGS= -I.. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/share/man/man1 LZ4DIR=.. TEST_FILES = COPYING -TEST_TARGETS=test-64 test-32 +TEST_TARGETS=test BENCH_NB=-i5 # Minimize test target for Travis CI's Build Matrix ifeq ($(LZ4_TRAVIS_CI_ENV),-m32) -TEST_TARGETS=test-32 +TEST_TARGETS=test-force32 BENCH_NB=-i1 else ifeq ($(LZ4_TRAVIS_CI_ENV),-m64) -TEST_TARGETS=test-64 +TEST_TARGETS=test BENCH_NB=-i1 endif @@ -125,11 +126,13 @@ uninstall: [ -f $(DESTDIR)$(MANDIR)/lz4cat.1 ] && rm -f $(DESTDIR)$(MANDIR)/lz4cat.1 @echo lz4 successfully uninstalled -test: $(TEST_TARGETS) +test: test-lz4 test-lz4c test-fullbench test-fuzzer test-mem -test-64: test-lz4 test-lz4c test-fullbench test-fuzzer test-mem +test-force32: test-lz4c32 test-fullbench32 test-fuzzer32 test-mem32 -test-32: test-lz4 test-lz4c32 test-fullbench32 test-fuzzer32 test-mem32 +test-all: test test-force32 + +test-travis: $(TEST_TARGETS) test-lz4: lz4 datagen ./datagen | ./lz4 | ./lz4 -vdq > $(VOID) @@ -138,7 +141,7 @@ test-lz4: lz4 datagen test-lz4c: lz4c datagen -test-lz4c32: lz4c32 lz4 datagen +test-lz4c32: lz4 lz4c32 lz4 datagen ./datagen | ./lz4c32 | ./lz4c32 -vdq > $(VOID) ./datagen | ./lz4c32 | ./lz4 -vdq > $(VOID) ./datagen -g256MB | ./lz4c32 -vqB4D | ./lz4c32 -vdq > $(VOID) |