e2fsprogs/lib/Makefile.elf-lib

54 lines
1.4 KiB
Makefile
Raw Normal View History

1997-04-26 17:58:21 +04:00
#
# 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
1997-04-26 18:37:06 +04:00
# ELF_SO_VERSION = 1
1997-04-26 17:58:21 +04:00
# ELF_IMAGE = libce
# ELF_MYDIR = et
# ELF_INSTALL_DIR = $(SHLIBDIR)
1997-04-29 20:15:03 +04:00
# ELF_OTHER_LIBS = -lc
1997-04-26 17:58:21 +04:00
all:: elfshared image
subdirs:: elfshared
elfshared:
mkdir elfshared
ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
1997-04-26 18:25:20 +04:00
ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
1997-04-26 17:58:21 +04:00
image: $(ELF_LIB)
$(ELF_LIB): $(OBJS)
1997-04-29 20:15:03 +04:00
(cd elfshared; $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) \
$(OBJS) $(ELF_OTHER_LIBS))
1997-04-26 17:58:21 +04:00
$(MV) elfshared/$(ELF_LIB) .
1997-04-26 18:25:20 +04:00
$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
1997-04-26 17:58:21 +04:00
$(LN) $(ELF_LIB) ../$(ELF_LIB)
$(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
1997-04-26 18:25:20 +04:00
$(LN) ../$(ELF_LIB) ../$(ELF_SONAME)
1997-04-26 17:58:21 +04:00
1997-04-29 18:53:37 +04:00
installdirs-elf-lib::
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR) \
$(DESTDIR)$(ulibdir)
1997-04-26 17:58:21 +04:00
1997-04-29 18:53:37 +04:00
installdirs:: installdirs-elf-lib
install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
1997-04-26 17:58:21 +04:00
$(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
1997-04-26 18:37:06 +04:00
$(STRIP) --strip-debug \
$(DESTDIR)$(DLL_INSTALL_DIR)/$(ELF_LIB)
1997-04-29 18:53:37 +04:00
$(LN_S) -f $(ELF_LIB) $(DESTDIR)$(DLL_INSTALL_DIR)/$(ELF_SONAME)
$(LN_S) -f $(DLL_INSTALL_DIR)/$(ELF_SONAME) \
$(DESTDIR)$(ulibdir)/$(ELF_IMAGE).so
1997-04-26 17:58:21 +04:00
-ldconfig
clean::
$(RM) -rf elfshared
$(RM) -f $(ELF_LIB)
1997-04-29 18:34:47 +04:00
$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)