Fix a gcc 4.6 warning.
[usmb.git] / Makefile.in
blob4b01113f89b0e09583cfc61839c6266a618d60a5
1 # usmb - mount SMB shares via FUSE and Samba
3 # @configure_input@
5 # Copyright (C) 2006-2010 Geoff Johnstone
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License version 3 as
9 # published by the Free Software Foundation.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 CC = @CC@
21 prefix = ${DESTDIR}@prefix@
22 exec_prefix = @exec_prefix@
23 bindir = @bindir@
24 datarootdir = @datarootdir@
25 mandir = @mandir@
26 man1dir = $(mandir)/man1
28 CFLAGS = @CFLAGS@ -I@srcdir@ -I@builddir@ -Werror
29 LDFLAGS = @LDFLAGS@
30 LIBS = @LIBS@
32 CFLAGS += @LIBXML2_CFLAGS@ @GLIB_CFLAGS@ @FUSE_CFLAGS@
33 LIBS += @LIBXML2_LIBS@ @GLIB_LIBS@ @FUSE_LIBS@
35 SOURCES = conffile.c options.c password.c usmb.c usmb_dir.c usmb_file.c \
36 utils.c version.c xml.c samba@SAMBA_VERSION@_compat.c
37 OBJECTS = $(SOURCES:.c=.o)
39 PROGRAM = @PACKAGE_NAME@
40 MANPAGE = $(PROGRAM).1
43 all: $(PROGRAM)
46 $(PROGRAM): $(OBJECTS)
47 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
50 clean:
51 $(RM) $(PROGRAM) $(OBJECTS)
54 distclean: clean
55 $(RM) -r core usmb-*.tar.bz2 usmb-*.tar.gz doc/*.mdzip.bak config.rng.h \
56 autom4te.cache config.h.in~ config.status config.log config.h \
57 Makefile
60 allclean: distclean
61 $(RM) configure config.h.in autom4te.cache
64 install-strip: STRIPFLAGS = -s
65 install install-strip: $(PROGRAM)
66 @MKDIR_P@ $(bindir) $(man1dir)
67 @INSTALL@ -m 755 $(STRIPFLAGS) $(PROGRAM) $(bindir)/
68 @INSTALL@ -m 644 $(MANPAGE) $(man1dir)/
71 uninstall:
72 $(RM) $(bindir)/$(PROGRAM) $(man1dir)/$(MANPAGE)
73 rmdir -p $(bindir) $(man1dir)
74 @echo Please delete ~/.usmb.conf manually.
77 dist: tar
80 PACKAGE = @PACKAGE_NAME@
81 ifeq ($(SNAPSHOT),)
82 VERSION = @PACKAGE_VERSION@
83 ARCHIVE = $(VERSION)
84 else
85 ARCHIVE = $(shell git show $(SNAPSHOT) '--pretty=format:%h' | head -n1 )
86 VERSION = $(shell date -ud "$(shell git show $(SNAPSHOT) '--pretty=format:%cD' | head -n1 )" "+%Y%m%d%H%M%S")~$(ARCHIVE)
87 endif
90 tar: STAGING=/tmp/usmb-$(VERSION)
91 tar:
92 mkdir $(STAGING)
93 git archive $(ARCHIVE) | tar -C $(STAGING) -x -f -
94 git log > $(STAGING)/Changelog
95 (cd $(STAGING) && \
96 autoreconf && \
97 rm -rf autom4te.cache)
98 (cd $(STAGING)/.. && \
99 tar jcf $(PWD)/$(PACKAGE)-$(VERSION).tar.bz2 $(PACKAGE)-$(VERSION) && \
100 tar zcf $(PWD)/$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION))
101 rm -rf $(STAGING)
103 include debian/Makefile.pkgdeb
106 config.rng.h: @srcdir@/config.rng
107 @SED@ -e 's/"/\\"/g' -e 's/\(.*\)/ "\1" \\/' \
108 -e '1istatic const char *rng_$(@:.rng.h=) =' $^ > config.rng.h
109 echo ' "";' >> config.rng.h
112 %.o: @srcdir@/%.c
113 $(CC) $(CFLAGS) -c -o $@ $<
116 .PHONY: all debug dist install install-strip uninstall clean distclean tar
118 conffile.o: @srcdir@/conffile.c @srcdir@/utils.h @srcdir@/xml.h \
119 @builddir@/config.rng.h
120 options.o: @srcdir@/options.c @srcdir@/options.h @srcdir@/utils.h \
121 @srcdir@/version.h
122 password.o: @srcdir@/password.c @srcdir@/password.h @srcdir@/utils.h
123 usmb.o: @srcdir@/usmb.c @srcdir@/conffile.h @srcdir@/options.h \
124 @srcdir@/usmb.h @srcdir@/usmb_dir.h @srcdir@/usmb_file.h \
125 @srcdir@/utils.h @srcdir@/password.h @srcdir@/version.h \
126 @srcdir@/samba3x-compat.h
127 usmb_dir.o: @srcdir@/samba3x-compat.h @srcdir@/usmb_dir.c @srcdir@/usmb_dir.h \
128 @srcdir@/usmb.h @srcdir@/utils.h
129 usmb_file.o: @srcdir@/samba3x-compat.h @srcdir@/usmb_file.c \
130 @srcdir@/usmb_file.h @srcdir@/usmb.h @srcdir@/utils.h
131 utils.o: @srcdir@/utils.c @srcdir@/utils.h
132 version.o: @srcdir@/version.c @srcdir@/version.h
133 xml.o: @srcdir@/xml.c @srcdir@/xml.h @srcdir@/utils.h