mb: Set coreboot as DSDT's manufacturer model ID
[coreboot.git] / util / cbfstool / lz4 / Makefile
blob931da35d9588d8e12fd0fac23d9f63789f1f645e
1 # ################################################################
2 # LZ4 - Makefile
3 # Copyright (C) Yann Collet 2011-2015
4 # All rights reserved.
6 # BSD license
7 # Redistribution and use in source and binary forms, with or without modification,
8 # are permitted provided that the following conditions are met:
10 # * Redistributions of source code must retain the above copyright notice, this
11 # list of conditions and the following disclaimer.
13 # * Redistributions in binary form must reproduce the above copyright notice, this
14 # list of conditions and the following disclaimer in the documentation and/or
15 # other materials provided with the distribution.
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 # You can contact the author at :
29 # - LZ4 source repository : https://github.com/Cyan4973/lz4
30 # - LZ4 forum froup : https://groups.google.com/forum/#!forum/lz4c
31 # ################################################################
33 # Version number
34 export VERSION=132
35 export RELEASE=r$(VERSION)
37 DESTDIR?=
38 PREFIX ?= /usr/local
40 LIBDIR ?= $(PREFIX)/lib
41 INCLUDEDIR=$(PREFIX)/include
42 PRGDIR = programs
43 LZ4DIR = lib
46 # Define nul output
47 ifneq (,$(filter Windows%,$(OS)))
48 VOID = nul
49 else
50 VOID = /dev/null
51 endif
54 .PHONY: default all lib lz4programs clean test versionsTest examples
56 default: lz4programs
58 all: lib lz4programs
60 lib:
61 @$(MAKE) -C $(LZ4DIR) all
63 lz4programs:
64 @$(MAKE) -C $(PRGDIR)
66 clean:
67 @$(MAKE) -C $(PRGDIR) $@ > $(VOID)
68 @$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
69 @$(MAKE) -C examples $@ > $(VOID)
70 @$(MAKE) -C versionsTest $@ > $(VOID)
71 @echo Cleaning completed
74 #------------------------------------------------------------------------
75 #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
76 ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
78 install:
79 @$(MAKE) -C $(LZ4DIR) $@
80 @$(MAKE) -C $(PRGDIR) $@
82 uninstall:
83 @$(MAKE) -C $(LZ4DIR) $@
84 @$(MAKE) -C $(PRGDIR) $@
86 travis-install:
87 sudo $(MAKE) install
89 test:
90 $(MAKE) -C $(PRGDIR) test
92 cmake:
93 @cd cmake_unofficial; cmake CMakeLists.txt; $(MAKE)
95 gpptest: clean
96 $(MAKE) all CC=g++ CFLAGS="-O3 -I../lib -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
98 clangtest: clean
99 CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) all CC=clang
101 sanitize: clean
102 CFLAGS="-O3 -g -fsanitize=undefined" $(MAKE) test CC=clang FUZZER_TIME="-T1mn" NB_LOOPS=-i1
104 staticAnalyze: clean
105 CFLAGS=-g scan-build --status-bugs -v $(MAKE) all
107 armtest: clean
108 CFLAGS="-O3 -Werror" $(MAKE) -C $(LZ4DIR) all CC=arm-linux-gnueabi-gcc
109 CFLAGS="-O3 -Werror" $(MAKE) -C $(PRGDIR) bins CC=arm-linux-gnueabi-gcc
111 versionsTest: clean
112 $(MAKE) -C versionsTest
114 examples:
115 $(MAKE) -C $(LZ4DIR)
116 $(MAKE) -C $(PRGDIR) lz4
117 $(MAKE) -C examples test
119 endif