2011-10-14 21:49:41 +02:00
|
|
|
#
|
|
|
|
# ifdtool - dump Intel Firmware Descriptor information
|
|
|
|
#
|
|
|
|
# Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
|
|
|
|
PROGRAM = ifdtool
|
|
|
|
|
|
|
|
CC = gcc
|
2018-10-07 03:58:27 +02:00
|
|
|
INSTALL = /usr/bin/env install
|
2011-10-14 21:49:41 +02:00
|
|
|
PREFIX = /usr/local
|
2019-08-08 22:59:25 +02:00
|
|
|
CFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -Werror
|
2019-12-12 00:47:42 +01:00
|
|
|
CFLAGS += -I../../src/commonlib/include -I../../src/commonlib/bsd/include
|
2019-08-08 22:59:25 +02:00
|
|
|
CFLAGS += -I../cbfstool/flashmap
|
2019-12-12 00:47:42 +01:00
|
|
|
CFLAGS += -include ../../src/commonlib/bsd/include/commonlib/bsd/compiler.h
|
2012-02-16 20:44:20 +01:00
|
|
|
LDFLAGS =
|
2011-10-14 21:49:41 +02:00
|
|
|
|
|
|
|
OBJS = ifdtool.o
|
2019-08-08 22:59:25 +02:00
|
|
|
OBJS += fmap.o
|
|
|
|
OBJS += kv_pair.o
|
|
|
|
OBJS += valstr.o
|
2011-10-14 21:49:41 +02:00
|
|
|
|
|
|
|
all: dep $(PROGRAM)
|
|
|
|
|
|
|
|
$(PROGRAM): $(OBJS)
|
|
|
|
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
|
|
|
|
|
|
|
|
clean:
|
2018-05-28 08:41:39 +02:00
|
|
|
rm -f $(PROGRAM) *.o *~ .dependencies
|
2011-10-14 21:49:41 +02:00
|
|
|
distclean: clean
|
|
|
|
|
|
|
|
dep:
|
|
|
|
@$(CC) $(CFLAGS) -MM *.c > .dependencies
|
|
|
|
|
2016-09-10 18:36:16 +02:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2019-08-08 22:59:25 +02:00
|
|
|
%.o: ../cbfstool/flashmap/%.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2011-10-14 21:49:41 +02:00
|
|
|
install: $(PROGRAM)
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
|
|
$(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
2012-02-16 20:44:20 +01:00
|
|
|
.PHONY: all clean distclean dep
|