blob: 0ca09f8c9de99bd85cf44795fd9a8c74cf2f86f6 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001#
Theodore Ts'o20562a42001-05-19 22:07:36 +00002# This is a Makefile stub which handles the creation of BSD shared
Theodore Ts'o50e1e101997-04-26 13:58:21 +00003# libraries.
4#
5# In order to use this stub, the following makefile variables must be defined.
6#
7# BSDLIB_VERSION = 1.0
8# BSDLIB_IMAGE = libce
9# BSDLIB_MYDIR = et
10# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
11#
12
Theodore Ts'o42c0b612008-01-01 16:48:09 -050013all:: image
Theodore Ts'o50e1e101997-04-26 13:58:21 +000014
Theodore Ts'o42c0b612008-01-01 16:48:09 -050015real-subdirs:: Makefile
Theodore Ts'o02ef1962005-12-29 22:45:29 -050016 @echo " MKDIR pic"
17 @mkdir -p pic
Theodore Ts'o50e1e101997-04-26 13:58:21 +000018
19BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION)
Theodore Ts'o434661f2004-02-29 22:46:49 -050020BSDLIB_PIC_FLAG = -fpic
Theodore Ts'o50e1e101997-04-26 13:58:21 +000021
22image: $(BSD_LIB)
23
24$(BSD_LIB): $(OBJS)
JP Abgralle0ed7402014-03-19 19:08:39 -070025 (cd pic; ld -Bshareable -o $(BSD_LIB) $(LDFLAGS) $(OBJS))
Theodore Ts'o50e1e101997-04-26 13:58:21 +000026 $(MV) pic/$(BSD_LIB) .
27 $(RM) -f ../$(BSD_LIB)
Theodore Ts'o5aa6c3f2010-05-17 19:21:42 -040028 (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
29 `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB))
Theodore Ts'o50e1e101997-04-26 13:58:21 +000030
31install-shlibs install:: $(BSD_LIB)
Theodore Ts'o522798d2004-12-15 11:28:55 -050032 @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
33 @$(INSTALL_PROGRAM) $(BSD_LIB) \
Theodore Ts'o39b50341998-04-01 02:51:21 +000034 $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
Theodore Ts'o522798d2004-12-15 11:28:55 -050035 @-$(LDCONFIG)
36
37install-strip: install
38
39install-shlibs-strip: install-shlibs
Theodore Ts'o50e1e101997-04-26 13:58:21 +000040
Theodore Ts'o39b50341998-04-01 02:51:21 +000041uninstall-shlibs uninstall::
42 $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
43
Theodore Ts'o50e1e101997-04-26 13:58:21 +000044clean::
45 $(RM) -rf pic
46 $(RM) -f $(BSD_LIB)
47 $(RM) -f ../$(BSD_LIB)