summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Add test-freestanding to MakefileTakayuki Matsuoka2022-08-081-0/+4
|
* Test support of Standard Makefile VariablesYann Collet2022-07-151-1/+38
| | | | to detect issues such as #958
* updated cmake testYann Collet2022-02-041-6/+10
| | | | use `cmake --build` instead of `make` directly
* make UNAME externally definableYann Collet2021-08-161-1/+1
| | | | | | | on top of providing a central definition place, which eases maintenance, it might also help for #1021. Also : updated doc
* Split c_standards into multiple Makefile targetsTakayuki Matsuoka2021-05-301-1/+10
| | | | | | | | | | | | To support older compiler which doesn't have explicit dialect option for C90 (gcc-4.4), this change set split "c_standards" into multiple part. Original "make c_standards" still works as intended. But this change gives extra freedom of choice for external program For example, CI can choose test for standards which is supported by specimen compiler. With this separation, we can also introduce C17 smoothly.
* Add CC propagation to 'make usan'Takayuki Matsuoka2021-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following command doesn't work as intended ``` cd git clone https://github.com/lz4/lz4.git cd lz4 make usan MOREFLAGS='-Wcomma -Werror' ``` ``` Cleaning completed cc: error: unrecognized command line option ‘-Wcomma’; did you mean ‘-Wcomment’? make[3]: *** [<builtin>: ../lib/lz4.o] Error 1 make[2]: *** [Makefile:65: lz4] Error 2 make[1]: *** [Makefile:133: test] Error 2 make: *** [Makefile:158: usan] Error 2 ``` Because the following part of the `Makefile` doesn't propagate `CC`, `CFLAGS` and `LDFLAGS` to child `$(MAKE)` properly. ``` .PHONY: usan usan: CC = clang usan: CFLAGS = -O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow usan: LDFLAGS = $(CFLAGS) usan: clean $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 ``` We need explicit propagation for child process ``` - $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 + CC=$(CC) CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 ``` After that, `make usan` works and it shows expected runtime error. ``` $ make usan MOREFLAGS='-Wcomma -Werror' Cleaning completed ../lib/lz4frame.c:907:25: runtime error: applying non-zero offset 65536 to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../lib/lz4frame.c:907:25 in ../lib/lz4frame.c:907:58: runtime error: applying zero offset to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../lib/lz4frame.c:907:58 in ... ``` Please note that `make usan` is working at travis-ci. Because `.travis.yml` has the following [explicit `compiler:` setting](https://github.com/lz4/lz4/blob/7a966c1511816b53ac93aa2f2a2ff97e036a4a60/.travis.yml#L66). ``` - name: (Trusty) USan test dist: trusty compiler: clang script: - make usan MOREFLAGS=-Wcomma -Werror ```
* fixed incorrect propagation of default CFLAGSYann Collet2021-04-271-3/+0
|
* fix strange printf formatting warningYann Collet2020-12-011-2/+3
| | | | so now, `%p` _requires_ a `void*` pointer ?
* fix scanbuild testYann Collet2020-12-011-3/+1
| | | | seems to require explicit environment variables
* fix CFLAGS unexport issueYann Collet2020-12-011-31/+38
|
* refactor MakefileYann Collet2020-12-011-24/+38
| | | | | remove usage of include Makefile.inc in too Makefile as it seems to somehow unexport CFLAGS ...
* make it possible to select SCANBUILD binary on command lineYann Collet2020-10-021-1/+3
|
* make scan-build accept assert()Yann Collet2020-10-011-1/+1
|
* fixed ubsan tests with dynamic libraryYann Collet2020-09-171-3/+6
|
* ubsan: make pointer overflow recoverableYann Collet2020-09-171-1/+1
| | | | | | | the way `base` is used must allow 2-complement address overflow. `base` is effectively a virtual pointer, never dereferenced directly. What matters is `base + index`. This is the address that will be dereference and must be valid (it is properly validated).
* fix ubsan testYann Collet2020-09-171-3/+3
| | | | | | which now fails with a clear error as intended (not just print a status and move on). should be reproduced on travisCI
* [build] Move CMake and Visual build systems to build/Nick Terrell2020-08-201-1/+1
| | | | Fixes #852.
* Move to using C rather than C++ for compilationMax Dymond2019-06-281-0/+1
|
* Add a fuzzing target that compiles in the oss-fuzz environmentMax Dymond2019-06-281-0/+1
|
* updated testsYann Collet2019-05-161-4/+7
| | | | | - only play listTest with `make test`, not `make all` which is limited to build - update `clangtest`, so that it's possible to disable O3 optimization, for faster processing
* Fix a test for mingwJPeterMugaas2019-04-221-1/+1
|
* Try to put some tests I made in ONE place. I also moved a test for ↵JPeterMugaas2019-04-221-46/+2
| | | | "install" in one place to try to isolate it.
* Initial commits from diff I submitted earlierJPeterMugaas2019-04-221-5/+48
|
* created LZ4_initStreamHC()Yann Collet2019-04-051-1/+5
| | | | | | | | - promoted LZ4_resetStreamHC_fast() to stable - moved LZ4_resetStreamHC() to deprecated (but do not generate a warning yet) - Updated doc, to highlight difference between init and reset - switched all invocations of LZ4_resetStreamHC() onto LZ4_initStreamHC() - misc: ensure `make all` also builds /tests
* Allow installation of lz4 for Windows 10 with MSYS2Vincent Torri2019-03-031-1/+1
|
* Allow installation of lz4 for Windows (MSYS2 or when cross-compiling)Vincent Torri2018-11-201-1/+1
|
* added cppcheckYann Collet2018-09-181-0/+5
| | | | | | as Makefile target and Travis CI test. Fixed last cppcheck warnings in tests and examples
* avoid final trailing comma for enum listsYann Collet2018-09-131-7/+7
| | | | | | | as detected in #485 by @JoachimSchneider. Refactored the c_standards tests so that these issues get automatically detected in CI tests.
* Add support for MidnightBSDLucas Holt2018-09-081-1/+1
|
* Test Linking C-Compiled Library and C++-Compiled TestsW. Felix Handte2018-05-221-0/+8
|
* Add Haiku as a validated target.fbrosson2018-05-171-1/+1
| | | | lz4 1.8.2 works fine on Haiku and passes all tests.
* reduced test time on circle-ciYann Collet2018-04-111-2/+2
|
* added c90 test to c_standardsYann Collet2018-03-211-1/+1
| | | | to catch `//` comments
* fix #481: ensure liblz4.a dependency for `make all`Yann Collet2018-03-091-1/+2
| | | | | | | | | `make all` will trigger several sub-directory makefiles. several of them need `liblz4.a`. When built with `-j#`, there are several concurrent liblz4.a built Make liblz4.a a dependency, which is built once, before moving to sub-directory Makefiles
* added target make checkYann Collet2018-02-261-3/+5
| | | | | | | | | | according to GNU Makefile conventions, the Makefile should feature a make check target to self-test the generated program: https://www.gnu.org/prep/standards/html_node/Standard-Targets.html . this is much less thorough and less taxing than `make test`, and can be run on any target in a reasonable timeframe (several seconds).
* examples/Makefile : changed dependency orderYann Collet2018-02-011-1/+1
| | | | static library *.a must come after source files *.c on linux
* Merge branch 'dev' into frameCompressYann Collet2018-02-011-11/+8
|\
| * modified gpptest recipeYann Collet2018-02-011-11/+8
| |
* | refactored frameCompress exampleYann Collet2018-01-311-1/+2
|/ | | | to better reflect LZ4F API usage.
* nicer console message for `make clean`Yann Collet2018-01-141-1/+1
|
* build: minor : `make lz4` doesn't compile liblz4 anymoreYann Collet2017-11-061-3/+3
| | | | since it's not needed.
* lz4c legacy commands are now enabled at runtime based on link/binary name "lz4c"Yann Collet2017-08-141-1/+4
| | | | | | | | | instead of selected at compilation time depending on a macro. This design makes it possible to have a single binary which supports both modes. An advantageous side effect is that when doing `make; make install` no additional binary is created during `make install` (it used to create `lz4c`, because `make` would only build `lz4`)
* better respect GNU standard Makefile conventionsYann Collet2017-08-141-13/+9
| | | | | | supports lowercase directory variables add an "Installation" section in README.md added an INSTALL file
* fixed c_standards testsYann Collet2017-05-101-10/+14
| | | | and added entry "make list"
* updated MakefileYann Collet2017-05-101-44/+37
| | | | | to automatically build manual files with make all
* Merge pull request #316 from inikep/devYann Collet2017-02-101-4/+4
|\ | | | | Dev
| * added OpenBSD NetBSD SunOS to list of supported `make install` OSesPrzemyslaw Skibinski2017-02-101-4/+4
| |
* | update repolink in makefileBenedikt Heine2017-02-101-1/+1
|/
* added DragonFly to list of supported `make install` OSYann Collet2017-02-091-1/+1
|
* added "This Makefile is validated for"Przemyslaw Skibinski2017-01-191-0/+2
|