Remove redundant vconf key insertion for liblazymount
[platform/adaptation/system-plugin.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
2
3 SUBDIRS = .
4
5 # legacy rc script dir
6 rcdir=$(sysconfdir)/rc.d
7
8 # Inherit from systemd
9 systemdsysconfdir=$(sysconfdir)/systemd
10 systemconfigunitdir=$(systemdsysconfdir)/system
11 userconfigunitdir=$(systemdsysconfdir)/user
12 systemdignoreunitdir=$(systemdsysconfdir)/default-extra-dependencies
13 systemunitdir=$(rootprefix)/lib/systemd/system
14 userunitdir=$(prefix)/lib/systemd/user
15 udevlibexecdir=$(rootprefix)/lib/udev
16 udevhomedir=$(udevlibexecdir)
17 udevrulesdir=$(udevlibexecdir)/rules.d
18 sysctldir=$(prefix)/lib/sysctl.d
19 tmpfilesdir=$(prefix)/lib/tmpfiles.d
20
21 # DBus
22 dbussystemservicedir=$(prefix)/share/dbus-1/system-services
23
24 pkgconfiglibdir=$(libdir)/pkgconfig
25
26 # And these are the special ones for /
27 rootprefix=@rootprefix@
28 rootbindir=$(rootprefix)/bin
29 rootlibexecdir=$(rootprefix)/lib/system
30
31 CLEANFILES =
32 EXTRA_DIST =
33
34 lib_LTLIBRARIES =
35 noinst_LTLIBRARIES =
36 noinst_DATA =
37 pkgconfiglib_DATA =
38
39 bin_SCRIPTS =
40 rc_SCRIPTS =
41 SCRIPT_IN_FILES =
42 sysconf_DATA =
43 sysctl_DATA =
44 systemdsysconf_DATA =
45 systemdignoreunit_DATA =
46 systemconfigunit_DATA =
47 systemunit_DATA =
48 udevrules_DATA =
49 tmpfiles_DATA =
50 dbussystemservice_DATA =
51
52 DEFAULT_CFLAGS = \
53         $(OUR_CFLAGS)
54
55 DEFAULT_LDFLAGS = \
56         $(OUR_LDFLAGS)
57
58 AM_CPPFLAGS = \
59         -include $(top_builddir)/config.h \
60         -I $(top_srcdir)/src \
61         -I $(top_srcdir)/src/shared \
62         $(DEFAULT_CFLAGS)
63
64 AM_CFLAGS = $(DEFAULT_CFLAGS)
65 AM_LDFLAGS = $(DEFAULT_LDFLAGS)
66
67 INSTALL_EXEC_HOOKS =
68 UNINSTALL_EXEC_HOOKS =
69
70 SHUTDOWN_TARGET_WANTS =
71 LOCAL_FS_TARGET_WANTS =
72 BASIC_TARGET_WANTS =
73 SYSINIT_TARGET_WANTS =
74 SOCKETS_TARGET_WANTS =
75 TIMERS_TARGET_WANTS =
76 TIZEN_INIT_TARGET_WANTS =
77 TIZEN_BOOT_TARGET_WANTS =
78 TIZEN_SYSTEM_TARGET_WANTS =
79 TIZEN_RUNTIME_TARGET_WANTS =
80 MULTI_USER_TARGET_WANTS =
81 GRAPHICAL_TARGET_WANTS =
82 DEFAULT_TARGET_WANTS =
83 SYSCONF_LOCAL_FS_TARGET_WANTS =
84
85 install-target-wants-hook:
86         where=$(systemunitdir) && what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
87         where=$(systemunitdir) && what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
88         where=$(systemunitdir) && what="$(BASIC_TARGET_WANTS)" && wants=basic.target && $(add-wants)
89         where=$(systemunitdir) && what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
90         where=$(systemunitdir) && what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
91         where=$(systemunitdir) && what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
92         where=$(systemunitdir) && what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
93         where=$(systemunitdir) && what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
94         where=$(systemunitdir) && what="$(TIZEN_INIT_TARGET_WANTS)" && wants=tizen-init.target && $(add-wants)
95         where=$(systemunitdir) && what="$(TIZEN_BOOT_TARGET_WANTS)" && wants=tizen-boot.target && $(add-wants)
96         where=$(systemunitdir) && what="$(TIZEN_SYSTEM_TARGET_WANTS)" && wants=tizen-system.target && $(add-wants)
97         where=$(systemunitdir) && what="$(TIZEN_RUNTIME_TARGET_WANTS)" && wants=tizen-runtime.target && $(add-wants)
98         where=$(systemunitdir) && what="$(TIZEN_RUNTIME_TARGET_WANTS)" && wants=tizen-runtime.target && $(add-wants)
99         where=$(systemunitdir) && what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && $(add-wants)
100         where=$(systemunitdir) && what="$(DEFAULT_TARGET_WANTS)" && wants=default.target && $(add-wants)
101         where=$(systemunitdir) && what="$(CHARGING_MODE_TARGET_WANTS)" && wants=charging-mode.target && $(add-wants)
102         where=$(systemconfigunitdir) && what="$(SYSCONF_LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
103
104 define add-wants
105 [ -z "$$what" -o -z "$$where" ] || ( \
106         dir=$(DESTDIR)$$where/$$wants.wants && \
107         $(MKDIR_P) -m 0755 $$dir && \
108         cd $$dir && \
109         rm -f $$what && \
110         for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
111 endef
112
113 INSTALL_EXEC_HOOKS += \
114         install-target-wants-hook
115
116 # ------------------------------------------------------------------------------
117 pkgconfiglib_DATA += \
118         src/liblazymount/liblazymount.pc
119
120 EXTRA_DIST += \
121         src/liblazymount/liblazymount.pc.in
122
123 CLEANFILES += \
124         src/liblazymount/liblazymount.pc
125
126 liblazymount_pkgincludedir=$(includedir)/lazymount
127 liblazymount_pkginclude_HEADERS =
128
129 liblazymount_pkginclude_HEADERS += src/liblazymount/lazy_mount.h
130
131 lib_LTLIBRARIES += \
132         liblazymount.la
133
134 liblazymount_la_SOURCES = \
135         src/liblazymount/lazy_mount.h \
136         src/liblazymount/lazy_mount_interface.c
137
138 liblazymount_la_CFLAGS = \
139         $(AM_CFLAGS) \
140         $(LIBLAZYMOUNT_PC_CFLAGS)
141
142 liblazymount_la_LIBADD = \
143         -L$(prefix)/lib \
144         -lvconf
145
146 noinst_liblazymount_la_SOURCES = \
147         src/liblazymount/lazy_mount.h \
148         src/liblazymount/lazy_mount_interface.c
149
150 # ------------------------------------------------------------------------------
151 bin_PROGRAMS = \
152         test_lazymount
153
154 test_lazymount_SOURCES = \
155         src/liblazymount/test_lazymount.c
156
157 test_lazymount_CFLAGS = \
158         $(AM_CFLAGS) \
159         -I. -Isrc/liblazymount \
160         $(LIBLAZYMOUNT_PC_CFLAGS)
161
162 test_lazymount_LDADD = \
163         -lvconf \
164         -lsystemd \
165         liblazymount.la
166
167 systemunit_DATA += \
168         units/lazy_mount.path \
169         units/lazy_mount.service
170
171 BASIC_TARGET_WANTS += \
172         lazy_mount.path
173
174 bin_SCRIPTS = \
175         scripts/mount-user.sh
176
177 # ------------------------------------------------------------------------------
178 substitutions = \
179        '|rootlibexecdir=$(rootlibexecdir)|' \
180        '|rootbindir=$(rootbindir)|' \
181        '|bindir=$(bindir)|' \
182        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
183        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
184        '|systemdsysconfdir=$(systemdsysconfdir)|' \
185        '|SYSTEM_CONFIG_UNIT_PATH=$(systemdsysconfdir)/system|' \
186        '|USER_CONFIG_UNIT_PATH=$(systemdsysconfdir)/user|' \
187        '|pkgdatadir=$(pkgdatadir)|' \
188        '|systemunitdir=$(systemunitdir)|' \
189        '|userunitdir=$(userunitdir)|' \
190        '|systempresetdir=$(systempresetdir)|' \
191        '|userpresetdir=$(userpresetdir)|' \
192        '|udevhwdbdir=$(udevhwdbdir)|' \
193        '|udevrulesdir=$(udevrulesdir)|' \
194        '|catalogdir=$(catalogdir)|' \
195        '|tmpfilesdir=$(tmpfilesdir)|' \
196        '|sysctldir=$(sysctldir)|' \
197        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
198        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
199        '|PACKAGE_URL=$(PACKAGE_URL)|' \
200        '|LIBLAZYMOUNT_PC_REQUIRES=$(LIBLAZYMOUNT_PC_REQUIRES)|' \
201        '|LIBLAZYMOUNT_PC_CFLAGS=$(LIBLAZYMOUNT_PC_CFLAGS)|' \
202        '|LIBLAZYMOUNT_PC_LIBS=$(LIBLAZYMOUNT_PC_LIBS)|' \
203        '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
204        '|prefix=$(prefix)|' \
205        '|exec_prefix=$(exec_prefix)|' \
206        '|libdir=$(libdir)|' \
207        '|includedir=$(includedir)|' \
208        '|VERSION=$(VERSION)|' \
209        '|rootprefix=$(rootprefix)|' \
210        '|udevlibexecdir=$(udevlibexecdir)|' \
211        '|SUSHELL=$(SUSHELL)|' \
212        '|DEBUGTTY=$(DEBUGTTY)|' \
213        '|KILL=$(KILL)|' \
214        '|KMOD=$(KMOD)|' \
215        '|MKDIR_P=$(MKDIR_P)|' \
216        '|QUOTAON=$(QUOTAON)|' \
217        '|QUOTACHECK=$(QUOTACHECK)|' \
218        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
219        '|VARLOGDIR=$(varlogdir)|' \
220        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
221        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
222        '|PYTHON=$(PYTHON)|' \
223        '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
224        '|INITAILBOOT_DONE=$(INITAILBOOT_DONE)|' \
225        '|INITIALIZE_DONE=$(INITIALIZE_DONE)|' \
226        '|READAHEAD_DIR=$(READAHEAD_DIR)|' \
227        '|DIRTY_WRITEBACK_CENTISECS=$(DIRTY_WRITEBACK_CENTISECS)|'
228
229 SED_PROCESS = \
230         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
231         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
232                 < $< > $@
233
234 units/%: units/%.in Makefile
235         $(SED_PROCESS)
236
237 %.rules: %.rules.in Makefile
238         $(SED_PROCESS)
239
240 %.sh: %.sh.in Makefile
241         $(SED_PROCESS)
242         $(AM_V_GEN)chmod +x $@
243
244 src/%: src/%.m4
245         $(AM_V_at)$(MKDIR_P) $(dir $@)
246         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
247
248 %.pc: %.pc.in
249         $(SED_PROCESS)
250
251 units/%: units/%.m4 Makefile
252         $(AM_V_M4)$(MKDIR_P) $(dir $@)
253         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
254
255 sysctl.d/%: sysctl.d/%.in Makefile
256         $(SED_PROCESS)
257
258 conf/%: conf/%.in
259         $(SED_PROCESS)
260
261 conf/%: conf/%.m4
262         $(AM_V_at)$(MKDIR_P) $(dir $@)
263         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
264
265 scripts/%: scripts/%.in
266         $(SED_PROCESS)
267
268 scripts/%: scripts/%.m4
269         $(AM_V_at)$(MKDIR_P) $(dir $@)
270         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
271
272 install-exec-hook: $(INSTALL_EXEC_HOOKS)