Whamcloud - gitweb
4bacd2745f7c683c605b224adcd758a069967e70
[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 
6 efined.
7 #
8 # BSDLIB_VERSION = 1.0
9 # BSDLIB_IMAGE = libce
10 # BSDLIB_MYDIR = et
11 # BSDLIB_INSTALL_DIR = $(SHLIBDIR)
12 #
13
14 all:: pic image
15
16 subdirs:: pic
17
18 pic:
19         mkdir pic
20
21 BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib
22
23 image:          $(BSD_LIB)
24
25 $(BSD_LIB): $(OBJS)
26         (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 
27  -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         $(INSTALL_PROGRAM) $(BSD_LIB) \
36                 $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
37         -$(LDCONFIG)
38
39 uninstall-shlibs uninstall::
40         $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
41
42 clean::
43         $(RM) -rf pic
44         $(RM) -f $(BSD_LIB)
45         $(RM) -f ../$(BSD_LIB)
46         $(RM) -f ../$(BSDLIB_IMAGE).dylib