blob: 10051dddddf576254aee528db2e9328ad127a37a [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001#
2# This is a Makefile stub which handles the creation of Linux ELF shared
3# libraries.
4#
5# In order to use this stub, the following makefile variables must be defined.
6#
7# ELF_VERSION = 1.0
8# ELF_IMAGE = libce
9# ELF_MYDIR = et
10# ELF_INSTALL_DIR = $(SHLIBDIR)
11#
12
13all:: elfshared image
14
15subdirs:: elfshared
16
17elfshared:
18 mkdir elfshared
19
20ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
21
22image: $(ELF_LIB)
23
24$(ELF_LIB): $(OBJS)
25 (cd elfshared; $(CC) --shared -o $(ELF_LIB) $(OBJS))
26 $(MV) elfshared/$(ELF_LIB) .
27 $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so
28 $(LN) $(ELF_LIB) ../$(ELF_LIB)
29 $(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
30
31installdirs::
32 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR)
33
34install-shlibs install:: $(ELF_LIB) installdirs
35 $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
36 -ldconfig
37
38clean::
39 $(RM) -rf elfshared
40 $(RM) -f $(ELF_LIB)
41 $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so