aboutsummaryrefslogtreecommitdiff
path: root/external/shared
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-05-26 10:47:17 -0400
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-06-07 18:28:25 +1000
commit45e548176e16ad8ba9540fcd75131ba4993e42b7 (patch)
treeaf41940ef6b7bdeef20c2369e209d3a07fad2a21 /external/shared
parente415b3b9bf0441745f442e12bfce25ed49c589bf (diff)
downloadskiboot-45e548176e16ad8ba9540fcd75131ba4993e42b7.zip
skiboot-45e548176e16ad8ba9540fcd75131ba4993e42b7.tar.gz
skiboot-45e548176e16ad8ba9540fcd75131ba4993e42b7.tar.bz2
external: Create shared rules.mk
Building a dynamically linked pflash will need the shared library name. Export it here. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/shared')
-rw-r--r--external/shared/Makefile9
-rw-r--r--external/shared/rules.mk1
2 files changed, 5 insertions, 5 deletions
diff --git a/external/shared/Makefile b/external/shared/Makefile
index b96c662..c643666 100644
--- a/external/shared/Makefile
+++ b/external/shared/Makefile
@@ -1,13 +1,12 @@
.DEFAULT_GOAL := all
GET_ARCH = ../../external/common/get_arch.sh
include ../../external/common/rules.mk
+include rules.mk
PREFIX ?= /usr/local/
LIBDIR = $(PREFIX)/lib
INCDIR = $(PREFIX)/include/libflash
-VERSION = $(shell ../../make_version.sh)
-
ifneq ($(ARCH), ARCH_ARM)
CFLAGS += -m64
endif
@@ -30,11 +29,11 @@ distclean: clean
rm -f ccan libflash common
all: links arch_links $(OBJS)
- $(CC) -shared -Wl,-soname,libflash.so -o libflash.so.$(VERSION) $(OBJS)
+ $(CC) -shared -Wl,-soname,libflash.so -o $(SHARED_NAME) $(OBJS)
install-lib: all
- install -D -m 0755 libflash.so.$(VERSION) $(LIBDIR)/libflash.so.$(VERSION)
- ln -sf libflash.so.$(VERSION) $(LIBDIR)/libflash.so
+ install -D -m 0755 $(SHARED_NAME) $(LIBDIR)/$(SHARED_NAME)
+ ln -sf $(SHARED_NAME) $(LIBDIR)/libflash.so
install-dev: links arch_links
mkdir -p $(INCDIR)
diff --git a/external/shared/rules.mk b/external/shared/rules.mk
new file mode 100644
index 0000000..a4976a1
--- /dev/null
+++ b/external/shared/rules.mk
@@ -0,0 +1 @@
+SHARED_NAME=libflash.so.$(shell ../../make_version.sh)