e2fsprogs/lib/Makefile.elf-lib
Theodore Ts'o 20562a48a5 Many files:
Makefile.bsd-lib, Makefile.dll-lib, Makefile.elf-lib,
  	Makefile.solaris-lib: Use $(LDCONFIG) instead of -ldconfig.
2001-05-19 22:07:36 +00:00

60 lines
1.6 KiB
Makefile

#
# This is a Makefile stub which handles the creation of Linux ELF shared
# libraries.
#
# In order to use this stub, the following makefile variables must be defined.
#
# ELF_VERSION = 1.0
# ELF_SO_VERSION = 1
# ELF_IMAGE = libce
# ELF_MYDIR = et
# ELF_INSTALL_DIR = $(SHLIBDIR)
# ELF_OTHER_LIBS = -lc
all:: elfshared image
subdirs:: elfshared
elfshared:
mkdir elfshared
ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
image: $(ELF_LIB)
$(ELF_LIB): $(OBJS)
(cd elfshared; $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) \
$(OBJS) $(ELF_OTHER_LIBS))
$(MV) elfshared/$(ELF_LIB) .
$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
$(LN) $(ELF_LIB) ../$(ELF_LIB)
$(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
$(LN) ../$(ELF_LIB) ../$(ELF_SONAME)
installdirs-elf-lib::
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR) \
$(DESTDIR)$(libdir)
installdirs:: installdirs-elf-lib
install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
$(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
$(STRIP) --strip-debug \
$(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
$(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
$(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
$(DESTDIR)$(libdir)/$(ELF_IMAGE).so
-$(LDCONFIG)
uninstall-shlibs uninstall::
$(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
$(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
$(DESTDIR)$(libdir)/$(ELF_IMAGE).so
-$(LDCONFIG)
clean::
$(RM) -rf elfshared
$(RM) -f $(ELF_LIB)
$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)