blob: 936aa50f9053b3d49319fb8e2c41e5065aee9ab2 [file] [log] [blame]
Stefan Reinauer1c795ad12011-10-14 12:49:41 -07001#
2# ifdtool - dump Intel Firmware Descriptor information
3#
4# Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; version 2 of the License.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
Stefan Reinauer1c795ad12011-10-14 12:49:41 -070015
16PROGRAM = ifdtool
17
18CC = gcc
19INSTALL = /usr/bin/install
20PREFIX = /usr/local
Bill XIE4651d452017-09-12 11:54:48 +080021CFLAGS = -O2 -g -Wall -W -Werror -I../../src/commonlib/include
Patrick Georgi472efa62012-02-16 20:44:20 +010022LDFLAGS =
Stefan Reinauer1c795ad12011-10-14 12:49:41 -070023
24OBJS = ifdtool.o
25
26all: dep $(PROGRAM)
27
28$(PROGRAM): $(OBJS)
29 $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
30
31clean:
32 rm -f $(PROGRAM) *.o *~
Stefan Reinauer1c795ad12011-10-14 12:49:41 -070033distclean: clean
Stefan Reinauer1c795ad12011-10-14 12:49:41 -070034
35dep:
36 @$(CC) $(CFLAGS) -MM *.c > .dependencies
37
Alexander Couzens746b6ab2016-09-10 18:36:16 +020038%.o: %.c
39 $(CC) $(CFLAGS) -c -o $@ $<
40
Stefan Reinauer1c795ad12011-10-14 12:49:41 -070041install: $(PROGRAM)
42 mkdir -p $(DESTDIR)$(PREFIX)/bin
43 $(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/bin
Stefan Reinauer1c795ad12011-10-14 12:49:41 -070044
Patrick Georgi472efa62012-02-16 20:44:20 +010045.PHONY: all clean distclean dep