Whamcloud - gitweb
Fix the Apple Darwin port.
[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
22 image:          $(BSD_LIB)
23
24 $(BSD_LIB): $(OBJS)
25         (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \
26                 -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS))
27         $(MV) pic/$(BSD_LIB) .
28         $(RM) -f ../$(BSD_LIB)
29         $(LN) $(BSD_LIB) ../$(BSD_LIB)
30         $(LN) ../$(BSD_LIB) ../$(BSDLIB_IMAGE).dylib
31
32 install-shlibs install:: $(BSD_LIB)
33         $(INSTALL_PROGRAM) $(BSD_LIB) \
34                 $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
35         -$(LDCONFIG)
36
37 uninstall-shlibs uninstall::
38         $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
39
40 clean::
41         $(RM) -rf pic
42         $(RM) -f $(BSD_LIB)
43         $(RM) -f ../$(BSD_LIB)
44         $(RM) -f ../$(BSDLIB_IMAGE).dylib