summaryrefslogtreecommitdiffstats
path: root/lib/Makefile.bsd-lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 09:25:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 09:25:10 +0000
commit5dced3d1b3deca80e01415a2e35dc7972dcbfae7 (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /lib/Makefile.bsd-lib
parentInitial commit. (diff)
downloade2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.tar.xz
e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.zip
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/Makefile.bsd-lib')
-rw-r--r--lib/Makefile.bsd-lib47
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/Makefile.bsd-lib b/lib/Makefile.bsd-lib
new file mode 100644
index 0000000..2792ba3
--- /dev/null
+++ b/lib/Makefile.bsd-lib
@@ -0,0 +1,47 @@
+#
+# This is a Makefile stub which handles the creation of BSD shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be defined.
+#
+# BSDLIB_VERSION = 1.0
+# BSDLIB_IMAGE = libce
+# BSDLIB_MYDIR = et
+# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
+#
+
+all:: image
+
+real-subdirs:: Makefile
+ @echo " MKDIR pic"
+ @mkdir -p pic
+
+BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION)
+BSDLIB_PIC_FLAG = -fpic
+
+image: $(BSD_LIB)
+
+$(BSD_LIB): $(OBJS)
+ (cd pic; ld -Bshareable -o $(BSD_LIB) $(LDFLAGS_SHLIB) $(OBJS))
+ $(MV) pic/$(BSD_LIB) .
+ $(RM) -f ../$(BSD_LIB)
+ (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB))
+
+install-shlibs install:: $(BSD_LIB)
+ @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
+ @$(INSTALL_PROGRAM) $(BSD_LIB) \
+ $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+ @-$(LDCONFIG)
+
+install-strip: install
+
+install-shlibs-strip:: install-shlibs
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+
+clean::
+ $(RM) -rf pic
+ $(RM) -f $(BSD_LIB)
+ $(RM) -f ../$(BSD_LIB)