Tizen 2.1 base
[framework/base/fuse.git] / util / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 
4 bin_PROGRAMS = fusermount ulockmgr_server
5 noinst_PROGRAMS = mount.fuse
6
7 # we re-use mount_util.c from the library, but do want to keep ourself
8 # as stand-alone as possible. in order to make an out-of-source build
9 # possible, we "generate" the file from its original location by
10 # copying it over.
11 fusermount_SOURCES = fusermount.c mount_util.c
12 fusermount_CPPFLAGS = -I$(top_srcdir)/lib
13 BUILT_SOURCES = mount_util.c
14 mount_util.c: $(top_srcdir)/lib/mount_util.c
15         @cp $(top_srcdir)/lib/mount_util.c .
16
17 mount_fuse_SOURCES = mount.fuse.c
18
19 ulockmgr_server_SOURCES = ulockmgr_server.c
20 ulockmgr_server_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_REENTRANT 
21 ulockmgr_server_LDFLAGS = -pthread
22
23 install-exec-hook:
24         -chmod u+s $(DESTDIR)$(bindir)/fusermount
25         @if test ! -e $(DESTDIR)/dev/fuse; then \
26                 $(MKDIR_P) $(DESTDIR)/dev; \
27                 echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true"; \
28                 mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true; \
29         fi
30
31 EXTRA_DIST = udev.rules init_script
32
33 MOUNT_FUSE_PATH = @MOUNT_FUSE_PATH@
34 UDEV_RULES_PATH = @UDEV_RULES_PATH@
35 INIT_D_PATH = @INIT_D_PATH@
36
37 install-exec-local:
38         $(MKDIR_P) $(DESTDIR)$(MOUNT_FUSE_PATH)
39         $(INSTALL_PROGRAM) $(builddir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse
40         $(MKDIR_P) $(DESTDIR)$(INIT_D_PATH)
41         $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
42         @if test -x /usr/sbin/update-rc.d; then \
43                 echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \
44                 /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
45         fi
46
47 install-data-local:
48         $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_PATH)
49         $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse.rules
50
51 uninstall-local:
52         rm -f $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse
53         rm -f $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse.rules
54         rm -f $(DESTDIR)$(INIT_D_PATH)/fuse
55         @if test -x /usr/sbin/update-rc.d; then \
56                 echo "/usr/sbin/update-rc.d fuse remove || true"; \
57                 /usr/sbin/update-rc.d fuse remove || true; \
58         fi