libsystem: add 64 bit signed/unsigned read-write api
[platform/core/system/libsystem.git] / src / Makefile.am
1 AUTOMAKE_OPTIONS = color-tests parallel-tests
2
3 pkgconfiglibdir=$(libdir)/pkgconfig
4
5 CLEANFILES =
6 EXTRA_DIST =
7
8 lib_LTLIBRARIES =
9 noinst_LTLIBRARIES =
10 noinst_DATA =
11 pkgconfiglib_DATA =
12
13 check_PROGRAMS =
14 check_DATA =
15 tests=
16 noinst_PROGRAMS = $(tests)
17 check_PROGRAMS += $(tests)
18 TESTS = $(tests)
19
20 DEFAULT_CFLAGS = \
21         $(OUR_CFLAGS)
22
23 DEFAULT_LDFLAGS = \
24         $(OUR_LDFLAGS)
25
26 AM_CPPFLAGS = \
27         -include $(top_builddir)/config.h \
28         $(DEFAULT_CFLAGS)
29
30 AM_CFLAGS = $(DEFAULT_CFLAGS)
31 AM_LDFLAGS = $(DEFAULT_LDFLAGS)
32
33 INSTALL_EXEC_HOOKS =
34 UNINSTALL_EXEC_HOOKS =
35
36 # ------------------------------------------------------------------------------
37 pkgconfiglib_DATA += \
38         libsystem/libsystem.pc
39
40 EXTRA_DIST += \
41         libsystem/libsystem.pc.in
42
43 CLEANFILES += \
44         libsystem/libsystem.pc
45
46 libsystem_pkgincludedir=$(includedir)/libsystem
47 libsystem_pkginclude_HEADERS =
48
49 libsystem_pkginclude_HEADERS += \
50         libsystem/config-parser.h \
51         libsystem/dbus-util.h \
52         libsystem/glib-util.h \
53         libsystem/libsystem.h \
54         libsystem/proc.h
55
56 lib_LTLIBRARIES += \
57         libsystem.la
58
59 libsystem_la_SOURCES = \
60         libsystem/config-parser.c \
61         libsystem/config-parser.h \
62         libsystem/dbus-util.h\
63         libsystem/exec.c \
64         libsystem/glib-util.c \
65         libsystem/glib-util.h \
66         libsystem/libsystem.c \
67         libsystem/libsystem.h \
68         libsystem/proc.c \
69         libsystem/proc-meminfo-lookup.c \
70         libsystem/proc-smaps-lookup.c \
71         libsystem/time-util.c
72
73 EXTRA_DIST += \
74         libsystem/proc-meminfo-lookup.gperf \
75         libsystem/proc-smaps-lookup.gperf
76
77 CLEANFILES += \
78         libsystem/proc-meminfo-lookup.c \
79         libsystem/proc-smaps-lookup.c
80
81 libsystem_la_CFLAGS = \
82         $(AM_CFLAGS) \
83         $(GLIB_CFLAGS)
84
85 libsystem_la_LIBADD = \
86         -lrt
87
88 # ------------------------------------------------------------------------------
89 test_truncate_nl_SOURCES = \
90         test/test-truncate_nl.c
91
92 test_truncate_nl_LDADD = \
93         libsystem.la
94
95 tests += test-truncate_nl
96
97 # ------------------------------------------------------------------------------
98 test_exec_SOURCES = \
99         test/test-exec.c
100
101 test_exec_LDADD = \
102         libsystem.la
103
104 tests += test-exec
105
106 # ------------------------------------------------------------------------------
107 test_cp_SOURCES = \
108         test/test-cp.c
109
110 test_cp_LDADD = \
111         libsystem.la
112
113 tests += test-cp
114
115 # ------------------------------------------------------------------------------
116 test_read_write_SOURCES = \
117         test/test-read-write.c
118
119 test_read_write_LDADD = \
120         libsystem.la
121
122 tests += test-read-write
123
124 # ------------------------------------------------------------------------------
125 pkgconfiglib_DATA += \
126         libsystem-sd/libsystem-sd.pc
127
128 EXTRA_DIST += \
129         libsystem-sd/libsystem-sd.pc.in
130
131 CLEANFILES += \
132         libsystem-sd/libsystem-sd.pc
133
134 libsystem_sd_pkgincludedir=$(includedir)/libsystem-sd
135 libsystem_sd_pkginclude_HEADERS =
136
137 libsystem_sd_pkginclude_HEADERS += \
138         libsystem-sd/systemd.h
139
140 lib_LTLIBRARIES += \
141         libsystem-sd.la
142
143 libsystem_sd_la_SOURCES = \
144         libsystem-sd/systemd.c \
145         libsystem-sd/systemd.h
146
147 libsystem_sd_la_CFLAGS = \
148         $(AM_CFLAGS) \
149         $(DBUS_CFLAGS) \
150         $(GLIB_CFLAGS) \
151         $(GIO_CFLAGS)
152
153 libsystem_sd_la_LIBADD = \
154         -lrt \
155         $(DBUS_LIBS) \
156         $(GIO_LIBS) \
157         libsystem.la
158
159 # ------------------------------------------------------------------------------
160 substitutions = \
161        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
162        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
163        '|PACKAGE_URL=$(PACKAGE_URL)|' \
164        '|LIBSYSTEM_PC_REQUIRES=$(LIBSYSTEM_PC_REQUIRES)|' \
165        '|LIBSYSTEM_PC_CFLAGS=$(LIBSYSTEM_PC_CFLAGS)|' \
166        '|LIBSYSTEM_PC_LIBS=$(LIBSYSTEM_PC_LIBS)|' \
167        '|LIBSYSTEM_SD_PC_REQUIRES=$(LIBSYSTEM_SD_PC_REQUIRES)|' \
168        '|LIBSYSTEM_SD_PC_CFLAGS=$(LIBSYSTEM_SD_PC_CFLAGS)|' \
169        '|LIBSYSTEM_SD_PC_LIBS=$(LIBSYSTEM_SD_PC_LIBS)|' \
170        '|includedir=$(includedir)|' \
171        '|VERSION=$(VERSION)|'
172
173 SED_PROCESS = \
174         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
175         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
176                 < $< > $@
177
178 %.pc: %.pc.in
179         $(SED_PROCESS)
180
181 %.c: %.gperf
182         $(AM_V_at)$(MKDIR_P) $(dir $@)
183         $(AM_V_GPERF)$(GPERF) < $< > $@
184
185 install-exec-hook: $(INSTALL_EXEC_HOOKS)