Whamcloud - gitweb
On Linux 2.6 systems, mke2fs and badblocks will check to see whether
[tools/e2fsprogs.git] / lib / Makefile.darwin-lib
1 #
2 # This is a Makefile stub which handles the creation of Darwin 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).$(BSDLIB_VERSION).dylib
21 BSDLIB_PIC_FLAG = -fPIC
22
23 image:          $(BSD_LIB)
24
25 $(BSD_LIB): $(OBJS)
26         @echo " GEN_BSD_SOLIB $(BSD_LIB)"
27         @(cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \
28                 -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS))
29         @$(MV) pic/$(BSD_LIB) .
30         @$(RM) -f ../$(BSD_LIB)
31         @$(LN) $(BSD_LIB) ../$(BSD_LIB)
32         @$(LN) ../$(BSD_LIB) ../$(BSDLIB_IMAGE).dylib
33
34 install-shlibs install:: $(BSD_LIB)
35         @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
36         @$(INSTALL_PROGRAM) $(BSD_LIB) \
37                 $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
38         @-$(LDCONFIG)
39
40 install-strip: install
41
42 install-shlibs-strip: install-shlibs
43
44 uninstall-shlibs uninstall::
45         $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
46
47 clean::
48         $(RM) -rf pic
49         $(RM) -f $(BSD_LIB)
50         $(RM) -f ../$(BSD_LIB)
51         $(RM) -f ../$(BSDLIB_IMAGE).dylib