carl9170: Update to latest upstream
[linux-libre-firmware.git] / isci / Makefile
1 # Makefile for create_fw
2 #
3 # This file is provided under a dual BSD/GPLv2 license.  When using or
4 # redistributing this file, you may do so under either license.
5 #
6 # GPL LICENSE SUMMARY
7 #
8 # Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of version 2 of the GNU General Public License as
12 # published by the Free Software Foundation.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
22 # The full GNU General Public License is included in this distribution
23 # in the file called LICENSE.GPL.
24 #
25 # BSD LICENSE
26 #
27 # Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
28 # All rights reserved.
29 #
30 # Redistribution and use in source and binary forms, with or without
31 # modification, are permitted provided that the following conditions
32 # are met:
33 #
34 #   * Redistributions of source code must retain the above copyright
35 #     notice, this list of conditions and the following disclaimer.
36 #   * Redistributions in binary form must reproduce the above copyright
37 #     notice, this list of conditions and the following disclaimer in
38 #     the documentation and/or other materials provided with the
39 #     distribution.
40 #   * Neither the name of Intel Corporation nor the names of its
41 #     contributors may be used to endorse or promote products derived
42 #     from this software without specific prior written permission.
43 #
44 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
45 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
46 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
47 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
48 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
49 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
50 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
51 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
52 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
53 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55
56 CC=gcc
57 CFLAGS=-c -Wall -O2 -g
58 LDFLAGS=
59 SOURCES=create_fw.c
60 OBJECTS=$(SOURCES:.cpp=.o)
61 EXECUTABLE=create_fw
62 BLOB=isci_firmware.bin
63
64 all: $(SOURCES) $(EXECUTABLE) $(BLOB)
65
66 $(EXECUTABLE): $(OBJECTS)
67         $(CC) $(LDFLAGS) $(OBJECTS) -o $@
68
69 .c.o:
70         $(CC) $(CFLAGS) $< -O $@
71
72 $(BLOB): $(EXECUTABLE)
73         ./$(EXECUTABLE) >$@
74
75 clean:
76         rm -f *.o $(EXECUTABLE)