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