[PATCH skeleton 1/9] Add install-headers target
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Jun 28 04:50:46 AEST 2016
From: Brad Bishop <bradleyb at fuzziesquirrel.com>
Install the libopenbmc_intf includes in prep for a devel
package.
Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
---
libopenbmc_intf/Makefile | 7 ++++++-
rules.mk | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libopenbmc_intf/Makefile b/libopenbmc_intf/Makefile
index 8853318..54bef57 100644
--- a/libopenbmc_intf/Makefile
+++ b/libopenbmc_intf/Makefile
@@ -1,14 +1,19 @@
PACKAGE_DEPS=gio-unix-2.0 glib-2.0
-INSTALLDEPS=install-lib
+INSTALLDEPS=install-lib install-headers
CLEANDEPS=clean-lib
DEFAULT_ALL=$(LIBOBMC)
ALL_CFLAGS+=-iquote ../gdbus
LIBOBMC=openbmc_intf
+INCLUDES=openbmc_intf.h openbmc.h gpio.h
$(LIBOBMC): %: %.o gpio.o
$(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname,lib$(LIBOBMC).so \
-o lib$@.so.1 $^ $(LDLIBS)
+install-headers:
+ @mkdir -p $(DESTDIR)$(includedir)
+ install $(INCLUDES) $(DESTDIR)$(includedir)
+
install-lib:
@mkdir -p $(DESTDIR)$(libdir)
install lib$(LIBOBMC).so.1 $(DESTDIR)$(libdir)
diff --git a/rules.mk b/rules.mk
index fb6c000..c7075c1 100644
--- a/rules.mk
+++ b/rules.mk
@@ -3,6 +3,7 @@ TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
.DEFAULT_GOAL := all
sbindir=/usr/sbin
libdir=/usr/lib
+includedir=/usr/include
LDLIBS+=$(shell pkg-config --libs $(PACKAGE_DEPS))
ALL_CFLAGS+=$(shell pkg-config --cflags $(PACKAGE_DEPS)) -fPIC -Werror $(CFLAGS)
--
2.9.0
More information about the openbmc
mailing list