Whamcloud - gitweb
Only use blocksizes > 4k on Linux 2.6 and newer systems.
[tools/e2fsprogs.git] / lib / Makefile.bsd-lib
1 #
2 # This is a Makefile stub which handles the creation of BSD shared
3 # 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
13 all:: pic image
14
15 subdirs:: pic
16
17 pic:
18         mkdir pic
19
20 BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION)
21 BSDLIB_PIC_FLAG = -fpic
22
23 image:          $(BSD_LIB)
24
25 $(BSD_LIB): $(OBJS)
26         (cd pic; ld -Bshareable -o $(BSD_LIB) $(OBJS))
27         $(MV) pic/$(BSD_LIB) .
28         $(RM) -f ../$(BSD_LIB)
29         $(LN) $(BSD_LIB) ../$(BSD_LIB)
30
31 install-shlibs install:: $(BSD_LIB)
32         $(INSTALL_PROGRAM) $(BSD_LIB) \
33                 $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
34         -$(LDCONFIG)
35
36 uninstall-shlibs uninstall::
37         $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
38
39 clean::
40         $(RM) -rf pic
41         $(RM) -f $(BSD_LIB)
42         $(RM) -f ../$(BSD_LIB)