1 ## SPDX-License-Identifier: BSD-2-Clause
2 # ################################################################
4 # Copyright (C) Yann Collet 2011-2015
7 # You can contact the author at :
8 # - LZ4 source repository : https://github.com/Cyan4973/lz4
9 # - LZ4 forum froup : https://groups.google.com/forum/#!forum/lz4c
10 # ################################################################
14 export RELEASE
=r
$(VERSION
)
19 LIBDIR ?
= $(PREFIX
)/lib
20 INCLUDEDIR
=$(PREFIX
)/include
26 ifneq (,$(filter Windows
%,$(OS
)))
33 .PHONY
: default
all lib lz4programs
clean test versionsTest examples
40 @
$(MAKE
) -C
$(LZ4DIR
) all
46 @
$(MAKE
) -C
$(PRGDIR
) $@
> $(VOID
)
47 @
$(MAKE
) -C
$(LZ4DIR
) $@
> $(VOID
)
48 @
$(MAKE
) -C examples
$@
> $(VOID
)
49 @
$(MAKE
) -C versionsTest
$@
> $(VOID
)
50 @echo Cleaning completed
53 #------------------------------------------------------------------------
54 #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
55 ifneq (,$(filter $(shell uname
),Linux Darwin GNU
/kFreeBSD GNU
))
58 @
$(MAKE
) -C
$(LZ4DIR
) $@
59 @
$(MAKE
) -C
$(PRGDIR
) $@
62 @
$(MAKE
) -C
$(LZ4DIR
) $@
63 @
$(MAKE
) -C
$(PRGDIR
) $@
69 $(MAKE
) -C
$(PRGDIR
) test
72 @cd cmake_unofficial
; cmake CMakeLists.txt
; $(MAKE
)
75 $(MAKE
) all CC
=g
++ CFLAGS
="-O3 -I../lib -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
78 CFLAGS
="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE
) all CC
=clang
81 CFLAGS
="-O3 -g -fsanitize=undefined" $(MAKE
) test CC
=clang FUZZER_TIME
="-T1mn" NB_LOOPS
=-i1
84 CFLAGS
=-g scan-build
--status-bugs
-v
$(MAKE
) all
87 CFLAGS
="-O3 -Werror" $(MAKE
) -C
$(LZ4DIR
) all CC
=arm-linux-gnueabi-gcc
88 CFLAGS
="-O3 -Werror" $(MAKE
) -C
$(PRGDIR
) bins CC
=arm-linux-gnueabi-gcc
91 $(MAKE
) -C versionsTest
95 $(MAKE
) -C
$(PRGDIR
) lz4
96 $(MAKE
) -C examples
test