summaryrefslogtreecommitdiff
path: root/tools/Makefile.am
blob: 0f73f61c37e7b5a6037783008b013f0b625c4e96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
## Process this file with automake to produce Makefile.in


SUBDIRS = device-manager

if HALD_COMPILE_LINUX
SUBDIRS += linux
endif
if HALD_COMPILE_FREEBSD
SUBDIRS += freebsd
endif

DIST_SUBDIRS = device-manager freebsd linux

INCLUDES = \
	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
	-DPACKAGE_SCRIPT_DIR=\""$(libdir)/hal/scripts"\" \
	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
	-I$(top_srcdir) -I$(top_srcdir)/libhal -I$(top_srcdir)/libhal-storage \
	@DBUS_CFLAGS@ @GLIB_CFLAGS@ @POLKIT_CFLAGS@

bin_PROGRAMS =                    \
	lshal                     \
	hal-get-property          \
	hal-set-property          \
	hal-find-by-capability    \
	hal-find-by-property      \
	hal-device		  \
	hal-is-caller-locked-out  \
	hal-lock

lshal_SOURCES = lshal.c
lshal_LDADD = @GLIB_LIBS@ $(top_builddir)/libhal/libhal.la

hal_get_property_SOURCES = hal_get_property.c
hal_get_property_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_set_property_SOURCES = hal_set_property.c
hal_set_property_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_find_by_capability_SOURCES = hal_find_by_capability.c
hal_find_by_capability_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_find_by_property_SOURCES = hal_find_by_property.c
hal_find_by_property_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_device_SOURCES = hal-device.c
hal_device_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_is_caller_locked_out_SOURCES = hal-is-caller-locked-out.c
hal_is_caller_locked_out_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_lock_SOURCES = hal-lock.c
hal_lock_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

libexec_PROGRAMS =                          \
	hal-storage-mount	            \
	hal-storage-unmount 	            \
	hal-storage-eject	            \
	hal-storage-closetray	            \
	hal-storage-cleanup-mountpoint      \
	hal-storage-cleanup-all-mountpoints \
	hal-system-power-pm-is-supported

if HAVE_PMU
libexec_PROGRAMS +=			    \
	hal-system-power-pmu
endif

if HAVE_SONYPIC
libexec_PROGRAMS +=		            \
	hal-system-sonypic
endif

if HAVE_ACLMGMT
libexec_PROGRAMS += hal-acl-tool

hal_acl_tool_SOURCES = hal-acl-tool.c
hal_acl_tool_LDADD = @GLIB_LIBS@ $(top_builddir)/libhal/libhal.la
endif

hal_system_power_pm_is_supported_SOURCES = hal-system-power-pm-is-supported.c
hal_system_power_pm_is_supported_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la

hal_storage_mount_SOURCES = hal-storage-mount.c hal-storage-shared.c hal-storage-shared.h
hal_storage_mount_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la

hal_storage_unmount_SOURCES = hal-storage-unmount.c hal-storage-shared.c hal-storage-shared.h
hal_storage_unmount_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la

hal_storage_eject_SOURCES = hal-storage-eject.c hal-storage-shared.c hal-storage-shared.h
hal_storage_eject_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la

hal_storage_closetray_SOURCES = hal-storage-closetray.c hal-storage-shared.c hal-storage-shared.h
hal_storage_closetray_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la

hal_storage_cleanup_mountpoint_SOURCES = hal-storage-cleanup-mountpoint.c hal-storage-shared.c hal-storage-shared.h
hal_storage_cleanup_mountpoint_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la

hal_storage_cleanup_all_mountpoints_SOURCES = hal-storage-cleanup-all-mountpoints.c hal-storage-shared.c hal-storage-shared.h
hal_storage_cleanup_all_mountpoints_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la

if HAVE_PMU
hal_system_power_pmu_SOURCES = hal-system-power-pmu.c
hal_system_power_pmu_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
endif

if HAVE_SONYPIC
hal_system_sonypic_SOURCES = hal-system-sonypic.c
hal_system_sonypic_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
endif

scriptdir = $(libdir)/hal/scripts

script_SCRIPTS =				\
	hal-luks-setup                          \
	hal-luks-teardown                       \
	hal-luks-remove		                \
	hal-system-power-suspend		\
	hal-system-power-suspend-hybrid		\
	hal-system-power-hibernate		\
	hal-system-power-shutdown		\
	hal-system-power-reboot			\
	hal-system-lcd-get-brightness		\
	hal-system-lcd-set-brightness		\
	hal-system-power-set-power-save		\
	hal-system-killswitch-get-power		\
	hal-system-killswitch-set-power

EXTRA_DIST=$(man_MANS) $(MAN_IN_FILES) gen-libgphoto-hal-fdi $(script_SCRIPTS)

if HAVE_UMOUNT_HAL
slashsbindir = /sbin
slashsbin_PROGRAMS = umount.hal

umount_hal_SOURCES = umount-hal.c
umount_hal_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la
endif

check:
	for f in $(script_SCRIPTS); do \
            echo -n "Validate bash syntax in $$f : "; \
            bash -n $(srcdir)/$$f 2> bash.error;\
            if test -s bash.error; then \
                echo failed; \
                cat bash.error; \
                rm -f bash.error; \
                exit 1; \
            else \
                echo ok; \
                rm -f bash.error; \
            fi; \
        done;

install-data-local:
	-$(mkdir_p) $(DESTDIR)$(localstatedir)/lib/hal
	-chown $(HAL_USER):$(HAL_GROUP) $(DESTDIR)$(localstatedir)/lib/hal
	-chmod 0700 $(DESTDIR)$(localstatedir)/lib/hal

clean-local :
	rm -f *~