From 38ef9fdb4b6690825fe3e54b6b44173e00316a94 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sun, 6 Jul 2014 21:28:11 +0300 Subject: [PATCH 1/3] build: respect CFLAGS/LDFLAGS Signed-off-by: Alon Bar-Lev --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 17abf61..e89bb76 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,8 @@ KGSHA_LIB = $(KGSHA_BUILD_DIR)/lib$(KGSHA_LIB_NAME).a KGGHOST_LIB = $(KGGHOST_BUILD_DIR)/lib$(KGGHOST_LIB_NAME).a SPACEMAP_LIB = $(SPACEMAP_BUILD_DIR)/lib$(SPACEMAP_LIB_NAME).a -BC_EXTRA_CFLAGS= -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +BC_EXTRA_CFLAGS= $(CFLAGS) -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +BC_EXTRA_LDFLAGS = $(LDFLAGS) # # commands @@ -86,7 +87,7 @@ BCTOOL_OBJS = container/linux/file.o \ src/bctool-rawlink.o BCTOOL_CFLAGS = $(BC_EXTRA_CFLAGS) -DBC_LINUX -Wall -I. -Icertificate/ -BCTOOL_LDFLAGS = -L$(TARGET_DIR) -l$(KERN_LIB_NAME) -l$(KGSHA_LIB_NAME) \ +BCTOOL_LDFLAGS = $(BC_EXTRA_LDFLAGS) -L$(TARGET_DIR) -l$(KERN_LIB_NAME) -l$(KGSHA_LIB_NAME) \ -l$(KGGHOST_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME) \ -ludev -lpthread -l$(FS_LIB_NAME) -- 1.8.5.5 From 632ba530d94675c62213ec9f2bd9a37a411a6050 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sun, 6 Jul 2014 21:30:49 +0300 Subject: [PATCH 2/3] build: create directories before put file + use install Signed-off-by: Alon Bar-Lev --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e89bb76..3cd36fd 100644 --- a/Makefile +++ b/Makefile @@ -238,6 +238,7 @@ uninstall: before-uninstall module-uninstall console-uninstall helpers-uninstall true helpers-install: + install -o root -m 0755 -d $(PREFIX)/sbin install -o root -m 4755 -s $(TARGET_DIR)/bcmount_helper $(PREFIX)/sbin install -o root -m 4755 -s $(TARGET_DIR)/bcumount_helper $(PREFIX)/sbin install -o root -m 4755 -s $(TARGET_DIR)/bcrrpart_helper $(PREFIX)/sbin @@ -261,9 +262,9 @@ before-uninstall: force-look # install for console only console-install: force-look - mkdir -p $(PREFIX)/usr/bin + install -o root -m 0755 -d $(PREFIX)/usr/bin install -o root -m 0755 -s build/bctool $(PREFIX)/usr/bin/ - mkdir -p $(PREFIX)/$(MAN_PATH)/man8 + install -o root -m 0755 -d $(PREFIX)/$(MAN_PATH)/man8 install -m 644 bctool.8 $(PREFIX)/$(MAN_PATH)/man8/ # uninstall for console only -- 1.8.5.5 From 4bce59bd9bc5a201caf5f2ff3e2080e7e5a01733 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sun, 6 Jul 2014 21:34:21 +0300 Subject: [PATCH 3/3] build: do not auto build/install module Signed-off-by: Alon Bar-Lev --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3cd36fd..a3fd59e 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ TESTS_TARGET = $(TARGET_DIR)/tests/bctool-tests # # default target builds console tool with modules -all: Makefile helpers module console +all: Makefile helpers console true rebuild: clean all @@ -226,7 +226,7 @@ module-clean: force-look # # install for default target -install: module-install console-install helpers-install +install: console-install helpers-install true # used by RPM creation script -- 1.8.5.5