acpi: Add IORT helper functions
[coreboot2.git] / util / cbfstool / lz4 / Makefile
blob4506267ebfe2a6ac36ea5d154e079c12b07f2928
1 ## SPDX-License-Identifier: BSD-2-Clause
2 # ################################################################
3 # LZ4 - Makefile
4 # Copyright (C) Yann Collet 2011-2015
5 # All rights reserved.
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 # ################################################################
12 # Version number
13 export VERSION=132
14 export RELEASE=r$(VERSION)
16 DESTDIR?=
17 PREFIX ?= /usr/local
19 LIBDIR ?= $(PREFIX)/lib
20 INCLUDEDIR=$(PREFIX)/include
21 PRGDIR = programs
22 LZ4DIR = lib
25 # Define nul output
26 ifneq (,$(filter Windows%,$(OS)))
27 VOID = nul
28 else
29 VOID = /dev/null
30 endif
33 .PHONY: default all lib lz4programs clean test versionsTest examples
35 default: lz4programs
37 all: lib lz4programs
39 lib:
40 @$(MAKE) -C $(LZ4DIR) all
42 lz4programs:
43 @$(MAKE) -C $(PRGDIR)
45 clean:
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))
57 install:
58 @$(MAKE) -C $(LZ4DIR) $@
59 @$(MAKE) -C $(PRGDIR) $@
61 uninstall:
62 @$(MAKE) -C $(LZ4DIR) $@
63 @$(MAKE) -C $(PRGDIR) $@
65 travis-install:
66 sudo $(MAKE) install
68 test:
69 $(MAKE) -C $(PRGDIR) test
71 cmake:
72 @cd cmake_unofficial; cmake CMakeLists.txt; $(MAKE)
74 gpptest: clean
75 $(MAKE) all CC=g++ CFLAGS="-O3 -I../lib -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
77 clangtest: clean
78 CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) all CC=clang
80 sanitize: clean
81 CFLAGS="-O3 -g -fsanitize=undefined" $(MAKE) test CC=clang FUZZER_TIME="-T1mn" NB_LOOPS=-i1
83 staticAnalyze: clean
84 CFLAGS=-g scan-build --status-bugs -v $(MAKE) all
86 armtest: clean
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
90 versionsTest: clean
91 $(MAKE) -C versionsTest
93 examples:
94 $(MAKE) -C $(LZ4DIR)
95 $(MAKE) -C $(PRGDIR) lz4
96 $(MAKE) -C examples test
98 endif