OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 CFLAGS += -static | 5 CFLAGS += -static |
6 LDFLAGS += -luuid | 6 LDFLAGS += -luuid |
7 BUILD_ROOT := ${BUILD}/cgpt | 7 BUILD_ROOT := ${BUILD}/cgpt |
8 | 8 |
9 INCLUDES = -I$(FWDIR)/lib/cgptlib/include | 9 INCLUDES = -I$(FWDIR)/lib/cgptlib/include |
10 LIBS = ${FWLIB} | 10 LIBS = ${FWLIB} |
11 | 11 |
12 DESTDIR ?= /usr/bin | 12 DESTDIR ?= /usr/bin |
13 | 13 |
14 PROGNAME = ${BUILD_ROOT}/cgpt | 14 PROGNAME = ${BUILD_ROOT}/cgpt |
15 | 15 |
16 ALL_SRCS = \ | 16 ALL_SRCS = \ |
17 cgpt.c \ | 17 cgpt.c \ |
18 cmd_show.c \ | 18 cmd_show.c \ |
19 cmd_repair.c \ | 19 cmd_repair.c \ |
20 cmd_create.c \ | 20 cmd_create.c \ |
21 cmd_add.c \ | 21 cmd_add.c \ |
22 cmd_boot.c \ | 22 cmd_boot.c \ |
23 cgpt_common.c | 23 cgpt_common.c |
24 | 24 |
| 25 main: $(PROGNAME) |
| 26 |
25 include ../common.mk | 27 include ../common.mk |
26 | 28 |
27 all: $(PROGNAME) | |
28 | |
29 $(PROGNAME): $(ALL_OBJS) $(LIBS) | 29 $(PROGNAME): $(ALL_OBJS) $(LIBS) |
30 $(CC) -o $(PROGNAME) $(CFLAGS) $^ $(LDFLAGS) | 30 $(CC) -o $(PROGNAME) $(CFLAGS) $^ $(LDFLAGS) |
31 | 31 |
32 install: $(PROGNAME) | 32 install: $(PROGNAME) |
33 mkdir -p $(DESTDIR) | 33 mkdir -p $(DESTDIR) |
34 cp -f $^ $(DESTDIR) | 34 cp -f $^ $(DESTDIR) |
35 chmod a+rx $(patsubst ${BUILD_ROOT}/%,$(DESTDIR)/%,$^) | 35 chmod a+rx $(patsubst ${BUILD_ROOT}/%,$(DESTDIR)/%,$^) |
36 | 36 |
37 .PHONY: all install | 37 .PHONY: all install |
OLD | NEW |