OLD | NEW |
| 1 |
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 4 # found in the LICENSE file. |
4 | 5 |
5 TOP ?= ../../ | 6 TOP ?= ../../ |
6 CC ?= cc | 7 CC ?= cc |
| 8 # Include /usr/include from inside the chroot, so that we get a version |
| 9 # of endian.h which contains endian-conversion macros - htole32(), etc. |
7 INCLUDES += -I$(TOP)/common/include -I$(TOP)/../../../chroot/usr/include/ | 10 INCLUDES += -I$(TOP)/common/include -I$(TOP)/../../../chroot/usr/include/ |
8 CFLAGS += -Wall -Werror -ggdb | 11 CFLAGS += -Wall -Werror -ggdb |
9 LIBS += $(FWLIB) | 12 LIBS += $(FWLIB) |
10 | 13 |
11 DESTDIR ?= /opt/bin | 14 DESTDIR ?= /opt/bin |
12 | 15 |
13 all: cgpt | 16 all: cgpt |
14 | 17 |
15 cgpt: cgpt.o cgpt_add_modify_delete.o cgpt_attribute.o cgpt_dev.o \ | 18 cgpt: cgpt.o cgpt_add_modify_delete.o cgpt_attribute.o cgpt_dev.o \ |
16 cgpt_options.o cgpt_repair.o cgpt_show.o $(LIBS) | 19 cgpt_options.o cgpt_repair.o cgpt_show.o cgpt_tofix.o $(LIBS) |
17 $(CC) -o cgpt $(CFLAGS) $^ | 20 $(CC) -o cgpt $(CFLAGS) $^ |
18 | 21 |
19 .c.o: $(INCLUDES) | 22 .c.o: $(INCLUDES) |
20 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ | 23 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ |
21 clean: | 24 clean: |
22 rm -f cgpt *.o *~ | 25 rm -f cgpt *.o *~ |
23 | 26 |
24 install: cgpt | 27 install: cgpt |
25 mkdir -p $(DESTDIR) | 28 mkdir -p $(DESTDIR) |
26 cp -f $^ $(DESTDIR) | 29 cp -f $^ $(DESTDIR) |
27 chmod a+rx $(patsubst %,$(DESTDIR)/%,$^) | 30 chmod a+rx $(patsubst %,$(DESTDIR)/%,$^) |
OLD | NEW |