]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/findlib/Makefile.in
7946ec6908daab5998da694f47fe96bbdfaf93eb
[bacula/bacula] / bacula / src / findlib / Makefile.in
1 #
2 #  Find files library Makefile
3 #
4 @MCOMMON@
5
6 srcdir =        .
7 VPATH =         .
8 .PATH:          .
9
10 # one up
11 basedir = ..
12 # top dir
13 topdir = ../..
14 # this dir relative to top dir
15 thisdir = src/findlib
16
17 DEBUG=@DEBUG@
18
19 first_rule: all
20 dummy:
21
22 #
23 # include files installed when using libtool
24 #
25 INCLUDE_FILES = bfile.h find.h protos.h 
26
27 #
28 LIBBACFIND_SRCS = find.c match.c find_one.c attribs.c create_file.c \
29                   bfile.c drivetype.c enable_priv.c fstype.c mkpath.c \
30                   savecwd.c
31 LIBBACFIND_OBJS = $(LIBBACFIND_SRCS:.c=.o)
32 LIBBACFIND_LOBJS = $(LIBBACFIND_SRCS:.c=.lo)
33
34 LIBBACFIND_LT_RELEASE = @LIBBACFIND_LT_RELEASE@
35
36 .SUFFIXES:      .c .o .lo
37 .PHONY:
38 .DONTCARE:
39
40 # inference rules
41 .c.o:
42         @echo "Compiling $<"
43         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
44
45 .c.lo:
46         @echo "Compiling $<"
47         $(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
48 #-------------------------------------------------------------------------
49 all: Makefile libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
50         @echo "==== Make of findlib is good ===="
51         @echo " "
52
53 libbacfind.a: $(LIBBACFIND_OBJS) 
54         @echo "Making $@ ..."
55         $(AR) rc  $@ $(LIBBACFIND_OBJS)
56         $(RANLIB) $@
57
58 libbacfind.la: Makefile $(LIBBACFIND_LOBJS) 
59         @echo "Making $@ ..."
60         $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE)
61
62 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
63         cd $(topdir) \
64           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
65
66 install-includes:
67         $(MKDIR) $(DESTDIR)/$(includedir)/bacula/findlib
68         for I in $(INCLUDE_FILES); do \
69            $(INSTALL_DATA) $$I $(DESTDIR)$(includedir)/bacula/findlib/`basename $$I`; \
70         done
71
72 uninstall-includes:
73         for I in $(INCLUDE_FILES); do \
74            $(RMF) $(DESTDIR)$(includedir)/bacula/findlib/`basename $$I`; \
75         done
76
77 libtool-install: all
78         $(MKDIR) $(DESTDIR)$(libdir)
79         $(RMF) $(DESTDIR)$(libdir)/libbacfind-*.so $(DESTDIR)$(libdir)/libbacfind.la
80         $(LIBTOOL_INSTALL_FINISH) $(INSTALL_LIB) libbacfind$(DEFAULT_ARCHIVE_TYPE) $(DESTDIR)$(libdir)
81
82 libtool-uninstall:
83         $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(libdir)/libbacfind.la
84
85 install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@
86
87 uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@
88
89 libtool-clean:
90         @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
91         @$(RMF) *.la
92         @$(RMF) -r .libs _libs
93
94 clean:  libtool-clean
95         @$(RMF) find core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
96
97 realclean: clean
98         @$(RMF) tags
99
100 distclean: realclean
101         if test $(srcdir) = .; then $(MAKE) realclean; fi
102         (cd $(srcdir); $(RMF) Makefile)
103
104 devclean: realclean
105         if test $(srcdir) = .; then $(MAKE) realclean; fi
106         (cd $(srcdir); $(RMF) Makefile)
107
108 # Semi-automatic generation of dependencies:
109 # Use gcc -M  because X11 `makedepend' doesn't work on all systems
110 # and it also includes system headers.
111 # `semi'-automatic since dependencies are generated at distribution time.
112
113 depend:
114         @$(MV) Makefile Makefile.bak
115         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
116         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
117         @for src in $(LIBBACFIND_SRCS); do \
118             $(CXX) -S -M -MT `basename $$src .c`$(DEFAULT_OBJECT_TYPE) $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $$src >> Makefile; \
119         done
120         @if test -f Makefile ; then \
121             $(RMF) Makefile.bak; \
122         else \
123            $(MV) Makefile.bak Makefile; \
124            echo " ===== Something went wrong in make depend ====="; \
125         fi
126
127 # -----------------------------------------------------------------------
128 # DO NOT DELETE: nice dependency list follows