hnvram: rename hnvram binary
This change installs the hnvram binary to hnvram_binary under /bin
It also modifies the platform Makefile to test what platform we are
building for, conditionally symlinking either the hnvram_wrapper or
hnvram_binary to /bin/hnvram.
Change-Id: I3faeffe13c0d60439e3be63784ef8679a1f82b83
diff --git a/Makefile b/Makefile
index 2f3aa95..319f0f2 100644
--- a/Makefile
+++ b/Makefile
@@ -78,10 +78,7 @@
DIRS+=conman
endif
-PREFIX=/usr
-BINDIR=$(DESTDIR)$(PREFIX)/bin
-LIBDIR=$(DESTDIR)$(PREFIX)/lib
-
+BINDIR=$(DESTDIR)/bin
all: $(addsuffix /all,$(DIRS)) build-optionspy
test: $(addsuffix /test,$(DIRS))
@@ -97,6 +94,15 @@
install:
set -e; for d in $(DIRS); do $(MAKE) -C $$d install; done
$(MAKE) install-optionspy
+ mkdir -p $(BINDIR)
+ rm -fv $(BINDIR)/hnvram
+ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME), gfmn110)
+ ln -s /bin/hnvram_wrapper $(BINDIR)/hnvram
+else ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME), gflt110)
+ ln -s /bin/hnvram_wrapper $(BINDIR)/hnvram
+else
+ ln -s /bin/hnvram_binary $(BINDIR)/hnvram
+endif
sysmgr/all: base/all libstacktrace/all libexperiments/all
cmds/all: libstacktrace/all libexperiments/all
diff --git a/hnvram/Makefile b/hnvram/Makefile
index c3368cb..c0b8242 100644
--- a/hnvram/Makefile
+++ b/hnvram/Makefile
@@ -29,7 +29,7 @@
install:
mkdir -p $(BINDIR)
- cp hnvram $(BINDIR)
+ cp hnvram $(BINDIR)/hnvram_binary
install-libs:
@echo "No libs to install."