Index: src/platform/vboot_reference/utility/cgpt/Makefile |
diff --git a/src/platform/vboot_reference/utility/cgpt/Makefile b/src/platform/vboot_reference/utility/cgpt/Makefile |
index adb12ab752b4e33dc940b858e88c72c4708e80e7..a6f7e79ca0f8034b1631e80de85e210f9971fe62 100644 |
--- a/src/platform/vboot_reference/utility/cgpt/Makefile |
+++ b/src/platform/vboot_reference/utility/cgpt/Makefile |
@@ -8,6 +8,8 @@ INCLUDES += -I$(TOP)/common/include -I$(TOP)/../../../chroot/usr/include/ |
CFLAGS += -Wall -Werror -ggdb |
LIBS += $(FWLIB) |
+DESTDIR ?= /opt/bin |
+ |
all: cgpt |
cgpt: cgpt.o cgpt_add_modify_delete.o cgpt_attribute.o cgpt_dev.o \ |
@@ -18,3 +20,8 @@ cgpt: cgpt.o cgpt_add_modify_delete.o cgpt_attribute.o cgpt_dev.o \ |
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ |
clean: |
rm -f cgpt *.o *~ |
+ |
+install: cgpt |
+ mkdir -p $(DESTDIR) |
+ cp -f $^ $(DESTDIR) |
+ chmod a+rx $(patsubst %,$(DESTDIR)/%,$^) |