2 # This is a Makefile stub which handles the creation of Linux ELF shared
5 # In order to use this stub, the following makefile variables must be defined.
11 # ELF_INSTALL_DIR = $(SHLIBDIR)
12 # ELF_OTHER_LIBS = -lc
16 real-subdirs:: Makefile
17 @echo " MKDIR elfshared"
20 ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
21 ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
26 @echo " GEN_ELF_SOLIB $(ELF_LIB)"
27 @(cd elfshared; $(CC) --shared -o $(ELF_LIB) $(LDFLAGS) \
28 -Wl,-h,$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS))
29 @$(MV) elfshared/$(ELF_LIB) .
30 @$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
31 @$(LN) $(ELF_LIB) ../$(ELF_LIB)
32 @$(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
33 @$(LN) ../$(ELF_LIB) ../$(ELF_SONAME)
36 $(MKINSTALLDIRS) $(DESTDIR)$(ELF_INSTALL_DIR) \
39 installdirs:: installdirs-elf-lib
41 install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
42 $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
43 $(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
44 $(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
45 $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
48 install-strip: install
49 $(STRIP) -x $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
51 install-shlibs-strip: install-shlibs
52 $(STRIP) -x $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
54 uninstall-shlibs uninstall::
55 $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
56 $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
57 $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
63 $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)