Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 1 | # |
| 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 | |
| 13 | all:: elfshared image |
| 14 | |
| 15 | subdirs:: elfshared |
| 16 | |
| 17 | elfshared: |
| 18 | mkdir elfshared |
| 19 | |
| 20 | ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION) |
| 21 | |
| 22 | image: $(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 | |
| 31 | installdirs:: |
| 32 | $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR) |
| 33 | |
| 34 | install-shlibs install:: $(ELF_LIB) installdirs |
| 35 | $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) |
| 36 | -ldconfig |
| 37 | |
| 38 | clean:: |
| 39 | $(RM) -rf elfshared |
| 40 | $(RM) -f $(ELF_LIB) |
| 41 | $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so |