7e8f12c3c852fbba9e4ee2137ea33db8130a83c5
[platform/upstream/ofono.git] / Makefile.am
1
2 AM_MAKEFLAGS = --no-print-directory
3
4 pkginclude_HEADERS = include/log.h include/plugin.h include/history.h \
5                         include/dbus.h include/modem.h include/types.h \
6                         include/call-barring.h include/call-forwarding.h \
7                         include/call-meter.h include/call-settings.h \
8                         include/phonebook.h include/ussd.h \
9                         include/sms.h include/sim.h include/message-waiting.h \
10                         include/netreg.h include/voicecall.h include/devinfo.h \
11                         include/cbs.h include/call-volume.h \
12                         include/gprs.h include/gprs-context.h \
13                         include/radio-settings.h include/stk.h \
14                         include/audio-settings.h include/nettime.h \
15                         include/ctm.h include/cdma-voicecall.h \
16                         include/cdma-sms.h include/sim-auth.h \
17                         include/gprs-provision.h include/emulator.h \
18                         include/location-reporting.h \
19                         include/cdma-connman.h include/gnss.h \
20                         include/private-network.h include/cdma-netreg.h \
21                         include/cdma-provision.h include/handsfree.h
22
23 nodist_pkginclude_HEADERS = include/version.h
24
25 local_headers = $(foreach file,$(pkginclude_HEADERS) \
26                                 $(nodist_pkginclude_HEADERS), \
27                                         include/ofono/$(notdir $(file)))
28
29 pkgconfigdir = $(libdir)/pkgconfig
30 pkgconfig_DATA = ofono.pc
31
32
33 if DATAFILES
34 dbusconfdir = @DBUS_CONFDIR@
35
36 dist_dbusconf_DATA = src/ofono.conf
37
38 if SYSTEMD
39 systemdunitdir = @SYSTEMD_UNITDIR@
40
41 systemdunit_DATA = src/ofono.service
42 endif
43
44 confdir = $(sysconfdir)/ofono
45
46 dist_conf_DATA =
47
48 statedir = $(localstatedir)/lib/ofono
49
50 state_DATA =
51 endif
52
53 builtin_modules =
54 builtin_sources =
55 builtin_libadd =
56 builtin_cflags =
57
58 gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
59                                         gdbus/object.c gdbus/polkit.c
60
61 gatchat_sources = gatchat/gatchat.h gatchat/gatchat.c \
62                                 gatchat/gatresult.h gatchat/gatresult.c \
63                                 gatchat/gatsyntax.h gatchat/gatsyntax.c \
64                                 gatchat/ringbuffer.h gatchat/ringbuffer.c \
65                                 gatchat/gatio.h gatchat/gatio.c \
66                                 gatchat/crc-ccitt.h gatchat/crc-ccitt.c \
67                                 gatchat/gatmux.h gatchat/gatmux.c \
68                                 gatchat/gsm0710.h gatchat/gsm0710.c \
69                                 gatchat/gattty.h gatchat/gattty.c \
70                                 gatchat/gatutil.h gatchat/gatutil.c \
71                                 gatchat/gat.h \
72                                 gatchat/gatserver.h gatchat/gatserver.c \
73                                 gatchat/gatrawip.h gatchat/gatrawip.c \
74                                 gatchat/gathdlc.c gatchat/gathdlc.h \
75                                 gatchat/gatppp.c gatchat/gatppp.h \
76                                 gatchat/ppp.h gatchat/ppp_cp.h \
77                                 gatchat/ppp_cp.c gatchat/ppp_lcp.c \
78                                 gatchat/ppp_auth.c gatchat/ppp_net.c \
79                                 gatchat/ppp_ipcp.c gatchat/ppp_ipv6cp.c
80
81 gisi_sources = gisi/client.c gisi/client.h gisi/common.h \
82                                 gisi/iter.c gisi/iter.h \
83                                 gisi/message.c gisi/message.h \
84                                 gisi/modem.c gisi/modem.h \
85                                 gisi/netlink.c gisi/netlink.h \
86                                 gisi/pep.c gisi/pep.h \
87                                 gisi/phonet.h \
88                                 gisi/pipe.c gisi/pipe.h \
89                                 gisi/server.c gisi/server.h \
90                                 gisi/socket.c gisi/socket.h
91
92 btio_sources = btio/btio.h btio/btio.c
93
94 if UDEV
95 builtin_modules += udev
96 builtin_sources += plugins/udev.c
97 builtin_cflags += @UDEV_CFLAGS@
98 builtin_libadd += @UDEV_LIBS@
99
100 builtin_modules += udevng
101 builtin_sources += plugins/udevng.c
102 endif
103
104 if ISIMODEM
105 builtin_modules += isimodem
106 builtin_sources += $(gisi_sources) \
107                         drivers/isimodem/isimodem.h \
108                         drivers/isimodem/isimodem.c \
109                         drivers/isimodem/mtc.h \
110                         drivers/isimodem/debug.h \
111                         drivers/isimodem/isiutil.h \
112                         drivers/isimodem/debug.c \
113                         drivers/isimodem/phonebook.c \
114                         drivers/isimodem/devinfo.c \
115                         drivers/isimodem/info.h \
116                         drivers/isimodem/network-registration.c \
117                         drivers/isimodem/network.h \
118                         drivers/isimodem/infoserver.h \
119                         drivers/isimodem/infoserver.c \
120                         drivers/isimodem/voicecall.c \
121                         drivers/isimodem/call.h \
122                         drivers/isimodem/sms.c \
123                         drivers/isimodem/sms.h \
124                         drivers/isimodem/cbs.c \
125                         drivers/isimodem/sim.c \
126                         drivers/isimodem/sim.h \
127                         drivers/isimodem/ussd.c \
128                         drivers/isimodem/call-forwarding.c \
129                         drivers/isimodem/call-settings.c \
130                         drivers/isimodem/call-barring.c \
131                         drivers/isimodem/call-meter.c \
132                         drivers/isimodem/ss.h \
133                         drivers/isimodem/radio-settings.c \
134                         drivers/isimodem/gss.h \
135                         drivers/isimodem/gprs.c \
136                         drivers/isimodem/gprs-context.c \
137                         drivers/isimodem/gpds.h \
138                         drivers/isimodem/audio-settings.c \
139                         drivers/isimodem/uicc.h \
140                         drivers/isimodem/uicc.c \
141                         drivers/isimodem/uicc-util.h \
142                         drivers/isimodem/uicc-util.c
143
144 builtin_modules += isiusb
145 builtin_sources += plugins/isiusb.c
146
147 builtin_modules += n900
148 builtin_sources += plugins/n900.c plugins/nokia-gpio.h plugins/nokia-gpio.c
149
150 builtin_modules += u8500
151 builtin_sources += plugins/u8500.c
152 endif
153
154 if QMIMODEM
155 qmi_sources = drivers/qmimodem/qmi.h drivers/qmimodem/qmi.c \
156                                         drivers/qmimodem/ctl.h \
157                                         drivers/qmimodem/dms.h \
158                                         drivers/qmimodem/nas.h \
159                                         drivers/qmimodem/wms.h \
160                                         drivers/qmimodem/wds.h \
161                                         drivers/qmimodem/pds.h \
162                                         drivers/qmimodem/common.h
163
164 builtin_modules += qmimodem
165 builtin_sources += $(qmi_sources) \
166                         drivers/qmimodem/util.h \
167                         drivers/qmimodem/qmimodem.h \
168                         drivers/qmimodem/qmimodem.c \
169                         drivers/qmimodem/devinfo.c \
170                         drivers/qmimodem/voicecall.c \
171                         drivers/qmimodem/network-registration.c \
172                         drivers/qmimodem/sim-legacy.c \
173                         drivers/qmimodem/sms.c \
174                         drivers/qmimodem/ussd.c \
175                         drivers/qmimodem/gprs.c \
176                         drivers/qmimodem/gprs-context.c \
177                         drivers/qmimodem/radio-settings.c \
178                         drivers/qmimodem/location-reporting.c
179
180 builtin_modules += gobi
181 builtin_sources += plugins/gobi.c
182 endif
183
184 if ATMODEM
185 builtin_modules += atmodem
186 builtin_sources += $(gatchat_sources) \
187                         drivers/atmodem/atmodem.h \
188                         drivers/atmodem/atmodem.c \
189                         drivers/atmodem/call-settings.c \
190                         drivers/atmodem/sms.c \
191                         drivers/atmodem/cbs.c \
192                         drivers/atmodem/call-forwarding.c \
193                         drivers/atmodem/call-meter.c \
194                         drivers/atmodem/network-registration.c \
195                         drivers/atmodem/sim.c \
196                         drivers/atmodem/stk.c \
197                         drivers/atmodem/stk.h \
198                         drivers/atmodem/ussd.c \
199                         drivers/atmodem/voicecall.c \
200                         drivers/atmodem/call-barring.c \
201                         drivers/atmodem/phonebook.c \
202                         drivers/atmodem/devinfo.c \
203                         drivers/atmodem/call-volume.c \
204                         drivers/atmodem/vendor.h \
205                         drivers/atmodem/atutil.h \
206                         drivers/atmodem/atutil.c \
207                         drivers/atmodem/gprs.c \
208                         drivers/atmodem/gprs-context.c \
209                         drivers/atmodem/sim-auth.c \
210                         drivers/atmodem/gnss.c
211
212 builtin_modules += nwmodem
213 builtin_sources += drivers/atmodem/atutil.h \
214                         drivers/nwmodem/nwmodem.h \
215                         drivers/nwmodem/nwmodem.c \
216                         drivers/nwmodem/radio-settings.c
217
218 builtin_modules += swmodem
219 builtin_sources += drivers/atmodem/atutil.h \
220                         drivers/swmodem/swmodem.h \
221                         drivers/swmodem/swmodem.c \
222                         drivers/swmodem/gprs-context.c
223
224 builtin_modules += ztemodem
225 builtin_sources += drivers/atmodem/atutil.h \
226                         drivers/ztemodem/ztemodem.h \
227                         drivers/ztemodem/ztemodem.c \
228                         drivers/ztemodem/radio-settings.c
229
230 builtin_modules += iceramodem
231 builtin_sources += drivers/atmodem/atutil.h \
232                         drivers/iceramodem/iceramodem.h \
233                         drivers/iceramodem/iceramodem.c \
234                         drivers/iceramodem/gprs-context.c \
235                         drivers/iceramodem/radio-settings.c
236
237 builtin_modules += huaweimodem
238 builtin_sources += drivers/atmodem/atutil.h \
239                         drivers/huaweimodem/huaweimodem.h \
240                         drivers/huaweimodem/huaweimodem.c \
241                         drivers/huaweimodem/ussd.c \
242                         drivers/huaweimodem/voicecall.c \
243                         drivers/huaweimodem/audio-settings.c \
244                         drivers/huaweimodem/gprs-context.c \
245                         drivers/huaweimodem/radio-settings.c \
246                         drivers/huaweimodem/cdma-netreg.c
247
248 builtin_modules += calypsomodem
249 builtin_sources += drivers/atmodem/atutil.h \
250                         drivers/calypsomodem/calypsomodem.h \
251                         drivers/calypsomodem/calypsomodem.c \
252                         drivers/calypsomodem/voicecall.c \
253                         drivers/calypsomodem/stk.c
254
255 builtin_modules += mbmmodem
256 builtin_sources += drivers/atmodem/atutil.h \
257                         drivers/mbmmodem/mbmmodem.h \
258                         drivers/mbmmodem/mbmmodem.c \
259                         drivers/mbmmodem/gprs-context.c \
260                         drivers/mbmmodem/stk.c \
261                         drivers/mbmmodem/location-reporting.c
262
263 builtin_modules += hsomodem
264 builtin_sources += drivers/atmodem/atutil.h \
265                         drivers/hsomodem/hsomodem.h \
266                         drivers/hsomodem/hsomodem.c \
267                         drivers/hsomodem/gprs-context.c \
268                         drivers/hsomodem/radio-settings.c
269
270 builtin_modules += ifxmodem
271 builtin_sources += drivers/atmodem/atutil.h \
272                         drivers/ifxmodem/ifxmodem.h \
273                         drivers/ifxmodem/ifxmodem.c \
274                         drivers/ifxmodem/voicecall.c \
275                         drivers/ifxmodem/audio-settings.c \
276                         drivers/ifxmodem/radio-settings.c \
277                         drivers/ifxmodem/gprs-context.c \
278                         drivers/ifxmodem/stk.c \
279                         drivers/ifxmodem/ctm.c
280
281 builtin_modules += stemodem
282 builtin_sources += drivers/atmodem/atutil.h \
283                         drivers/stemodem/stemodem.h \
284                         drivers/stemodem/stemodem.c \
285                         drivers/stemodem/voicecall.c \
286                         drivers/stemodem/radio-settings.c \
287                         drivers/stemodem/caif_rtnl.c \
288                         drivers/stemodem/caif_rtnl.h \
289                         drivers/stemodem/gprs-context.c \
290                         drivers/stemodem/caif_socket.h \
291                         drivers/stemodem/if_caif.h
292
293 builtin_modules += dunmodem
294 builtin_sources += drivers/atmodem/atutil.h \
295                         drivers/dunmodem/dunmodem.h \
296                         drivers/dunmodem/dunmodem.c \
297                         drivers/dunmodem/network-registration.c \
298                         drivers/dunmodem/gprs.c
299
300 builtin_modules += hfpmodem
301 builtin_sources += drivers/atmodem/atutil.h \
302                         drivers/hfpmodem/hfpmodem.h \
303                         drivers/hfpmodem/hfpmodem.c \
304                         drivers/hfpmodem/slc.h \
305                         drivers/hfpmodem/slc.c \
306                         drivers/hfpmodem/voicecall.c \
307                         drivers/hfpmodem/network-registration.c \
308                         drivers/hfpmodem/call-volume.c \
309                         drivers/hfpmodem/devinfo.c \
310                         drivers/hfpmodem/handsfree.c
311
312 builtin_modules += speedupmodem
313 builtin_sources += drivers/atmodem/atutil.h \
314                         drivers/speedupmodem/speedupmodem.h \
315                         drivers/speedupmodem/speedupmodem.c \
316                         drivers/speedupmodem/ussd.c
317
318 if PHONESIM
319 builtin_modules += phonesim
320 builtin_sources += plugins/phonesim.c
321
322 if DATAFILES
323 dist_conf_DATA += plugins/phonesim.conf
324 endif
325 endif
326
327 if CDMAMODEM
328 builtin_modules += cdmamodem
329 builtin_sources += drivers/cdmamodem/cdmamodem.h \
330                         drivers/cdmamodem/cdmamodem.c \
331                         drivers/cdmamodem/voicecall.c \
332                         drivers/cdmamodem/devinfo.c \
333                         drivers/cdmamodem/connman.c
334 endif
335
336 builtin_modules += g1
337 builtin_sources += plugins/g1.c
338
339 builtin_modules += wavecom
340 builtin_sources += plugins/wavecom.c
341
342 builtin_modules += calypso
343 builtin_sources += plugins/calypso.c
344
345 builtin_modules += mbm
346 builtin_sources += plugins/mbm.c
347
348 builtin_modules += hso
349 builtin_sources += plugins/hso.c
350
351 builtin_modules += zte
352 builtin_sources += plugins/zte.c
353
354 builtin_modules += huawei
355 builtin_sources += plugins/huawei.c
356
357 builtin_modules += sierra
358 builtin_sources += plugins/sierra.c
359
360 builtin_modules += novatel
361 builtin_sources += plugins/novatel.c
362
363 builtin_modules += palmpre
364 builtin_sources += plugins/palmpre.c
365
366 builtin_modules += ifx
367 builtin_sources += plugins/ifx.c
368
369 builtin_modules += ste
370 builtin_sources += plugins/ste.c
371
372 builtin_modules += stemgr
373 builtin_sources += plugins/stemgr.c
374
375 builtin_modules += caif
376 builtin_sources += plugins/caif.c
377
378 builtin_modules += tc65
379 builtin_sources += plugins/tc65.c
380
381 builtin_modules += nokia
382 builtin_sources += plugins/nokia.c
383
384 builtin_modules += nokiacdma
385 builtin_sources += plugins/nokiacdma.c
386
387 builtin_modules += linktop
388 builtin_sources += plugins/linktop.c
389
390 builtin_modules += icera
391 builtin_sources += plugins/icera.c
392
393 builtin_modules += alcatel
394 builtin_sources += plugins/alcatel.c
395
396 builtin_modules += speedup
397 builtin_sources += plugins/speedup.c
398
399 builtin_modules += speedupcdma
400 builtin_sources += plugins/speedupcdma.c
401
402 builtin_modules += samsung
403 builtin_sources += plugins/samsung.c
404
405 builtin_modules += sim900
406 builtin_sources += plugins/sim900.c
407
408 if BLUETOOTH
409 builtin_modules += bluetooth
410 builtin_sources += plugins/bluetooth.c plugins/bluetooth.h
411
412 builtin_modules += telit
413 builtin_sources += plugins/telit.c plugins/bluetooth.h
414
415 builtin_modules += sap
416 builtin_sources += plugins/sap.c plugins/bluetooth.h
417
418 builtin_modules += hfp
419 builtin_sources += plugins/hfp_hf.c plugins/bluetooth.h
420
421 builtin_modules += hfp_ag
422 builtin_sources += plugins/hfp_ag.c plugins/bluetooth.h
423
424 builtin_modules += dun_gw
425 builtin_sources += plugins/dun_gw.c plugins/bluetooth.h
426
427 builtin_modules += connman
428 builtin_sources += plugins/connman.c
429
430 builtin_sources += $(btio_sources)
431 builtin_cflags += @BLUEZ_CFLAGS@
432 builtin_libadd += @BLUEZ_LIBS@
433 endif
434 endif
435
436 if PROVISION
437 builtin_sources += plugins/mbpi.h plugins/mbpi.c
438
439 builtin_modules += provision
440 builtin_sources += plugins/provision.c
441
442 builtin_modules += cdma_provision
443 builtin_sources += plugins/cdma-provision.c
444 endif
445
446 if MAINTAINER_MODE
447 builtin_modules += example_history
448 builtin_sources += examples/history.c
449
450 builtin_modules += example_nettime
451 builtin_sources += examples/nettime.c
452
453 builtin_modules += example_provision
454 builtin_sources += examples/provision.c
455
456 builtin_modules += example_emulator
457 builtin_sources += examples/emulator.c
458
459 builtin_modules += example_private_network
460 builtin_sources += examples/private-network.c
461 endif
462
463 builtin_modules += smart_messaging
464 builtin_sources += plugins/smart-messaging.c
465
466 builtin_modules += push_notification
467 builtin_sources += plugins/push-notification.c
468
469 sbin_PROGRAMS = src/ofonod
470
471 src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) src/ofono.ver \
472                         src/main.c src/ofono.h src/log.c src/plugin.c \
473                         src/modem.c src/common.h src/common.c \
474                         src/manager.c src/dbus.c src/util.h src/util.c \
475                         src/network.c src/voicecall.c src/ussd.c src/sms.c \
476                         src/call-settings.c src/call-forwarding.c \
477                         src/call-meter.c src/smsutil.h src/smsutil.c \
478                         src/call-barring.c src/sim.c src/stk.c \
479                         src/phonebook.c src/history.c src/message-waiting.c \
480                         src/simutil.h src/simutil.c src/storage.h \
481                         src/storage.c src/cbs.c src/watch.c src/call-volume.c \
482                         src/gprs.c src/idmap.h src/idmap.c \
483                         src/radio-settings.c src/stkutil.h src/stkutil.c \
484                         src/nettime.c src/stkagent.c src/stkagent.h \
485                         src/simfs.c src/simfs.h src/audio-settings.c \
486                         src/smsagent.c src/smsagent.h src/ctm.c \
487                         src/cdma-voicecall.c src/sim-auth.c \
488                         src/message.h src/message.c src/gprs-provision.c \
489                         src/emulator.c src/location-reporting.c \
490                         src/cdma-connman.c src/gnss.c \
491                         src/gnssagent.c src/gnssagent.h \
492                         src/cdma-smsutil.h src/cdma-smsutil.c \
493                         src/cdma-sms.c src/private-network.c src/cdma-netreg.c \
494                         src/cdma-provision.c src/handsfree.c
495
496 src_ofonod_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ -ldl
497
498 src_ofonod_LDFLAGS = -Wl,--export-dynamic \
499                                 -Wl,--version-script=$(srcdir)/src/ofono.ver
500
501 BUILT_SOURCES = $(local_headers) src/builtin.h
502
503 CLEANFILES = $(BUILT_SOURCES) $(rules_DATA)
504
505 plugindir = $(pkglibdir)/plugins
506
507 if MAINTAINER_MODE
508 build_plugindir = $(abs_top_srcdir)/plugins/.libs
509 else
510 build_plugindir = $(plugindir)
511 endif
512
513 AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @USB_CFLAGS@ \
514                                         $(builtin_cflags) \
515                                         -DOFONO_PLUGIN_BUILTIN \
516                                         -DPLUGINDIR=\""$(build_plugindir)"\"
517
518 INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/src \
519                         -I$(srcdir)/gdbus -I$(srcdir)/gisi -I$(srcdir)/gatchat \
520                         -I$(srcdir)/btio
521
522 doc_files = doc/overview.txt doc/ofono-paper.txt doc/release-faq.txt \
523                 doc/manager-api.txt doc/modem-api.txt doc/network-api.txt \
524                         doc/voicecallmanager-api.txt doc/voicecall-api.txt \
525                         doc/call-forwarding-api.txt doc/call-settings-api.txt \
526                         doc/call-meter-api.txt doc/call-barring-api.txt \
527                         doc/supplementaryservices-api.txt \
528                         doc/connman-api.txt doc/features.txt \
529                         doc/pushnotification-api.txt \
530                         doc/smartmessaging-api.txt \
531                         doc/call-volume-api.txt doc/cell-broadcast-api.txt \
532                         doc/messagemanager-api.txt doc/message-waiting-api.txt \
533                         doc/phonebook-api.txt doc/radio-settings-api.txt \
534                         doc/sim-api.txt doc/stk-api.txt \
535                         doc/audio-settings-api.txt doc/text-telephony-api.txt \
536                         doc/calypso-modem.txt doc/message-api.txt \
537                         doc/location-reporting-api.txt \
538                         doc/certification.txt
539
540
541 test_scripts = test/backtrace \
542                 test/create-internet-context \
543                 test/create-mms-context \
544                 test/activate-context \
545                 test/deactivate-context \
546                 test/deactivate-all \
547                 test/dial-number \
548                 test/list-calls \
549                 test/answer-calls \
550                 test/reject-calls \
551                 test/create-multiparty \
552                 test/private-chat \
553                 test/disable-modem \
554                 test/enable-modem \
555                 test/enter-pin \
556                 test/reset-pin \
557                 test/hangup-all \
558                 test/hangup-active \
559                 test/set-mms-details \
560                 test/set-roaming-allowed \
561                 test/list-contexts \
562                 test/list-modems \
563                 test/list-operators \
564                 test/scan-for-operators \
565                 test/get-operators\
566                 test/monitor-ofono \
567                 test/process-context-settings \
568                 test/receive-sms \
569                 test/remove-contexts \
570                 test/send-sms \
571                 test/set-mic-volume \
572                 test/set-speaker-volume \
573                 test/test-stk-menu \
574                 test/test-advice-of-charge \
575                 test/test-call-barring \
576                 test/test-call-forwarding \
577                 test/test-call-settings \
578                 test/test-modem \
579                 test/test-network-registration \
580                 test/test-phonebook \
581                 test/test-cbs \
582                 test/test-ss \
583                 test/test-ss-control-cb \
584                 test/test-ss-control-cf \
585                 test/test-ss-control-cs \
586                 test/test-voicecall \
587                 test/send-ussd \
588                 test/cancel-ussd \
589                 test/initiate-ussd \
590                 test/offline-modem \
591                 test/online-modem \
592                 test/get-tech-preference \
593                 test/set-tech-preference \
594                 test/set-use-sms-reports \
595                 test/set-cbs-topics \
596                 test/enable-cbs \
597                 test/lock-pin \
598                 test/unlock-pin \
599                 test/change-pin \
600                 test/enable-gprs \
601                 test/disable-gprs \
602                 test/get-icon \
603                 test/set-fast-dormancy \
604                 test/test-push-notification \
605                 test/test-smart-messaging \
606                 test/send-vcard \
607                 test/send-vcal \
608                 test/set-tty \
609                 test/set-gsm-band \
610                 test/set-umts-band \
611                 test/lockdown-modem \
612                 test/set-call-forwarding \
613                 test/cdma-list-call \
614                 test/cdma-dial-number \
615                 test/cdma-hangup \
616                 test/cdma-set-credentials \
617                 test/disable-call-forwarding \
618                 test/list-messages \
619                 test/test-sms \
620                 test/test-message-waiting \
621                 test/cdma-connman-disable \
622                 test/cdma-connman-enable \
623                 test/set-context-property \
624                 test/test-gnss \
625                 test/swap-calls \
626                 test/release-and-answer \
627                 test/hold-and-answer \
628                 test/hangup-multiparty
629
630 if TEST
631 testdir = $(pkglibdir)/test
632 test_SCRIPTS = $(test_scripts)
633 endif
634
635 EXTRA_DIST = src/genbuiltin plugins/ofono.rules plugins/ofono-speedup.rules \
636                                 $(doc_files) $(test_scripts)
637
638 dist_man_MANS = doc/ofonod.8
639
640
641 unit_objects =
642
643 unit_tests = unit/test-common unit/test-util unit/test-idmap \
644                                 unit/test-simutil unit/test-stkutil \
645                                 unit/test-sms unit/test-cdmasms
646
647 noinst_PROGRAMS = $(unit_tests) \
648                         unit/test-sms-root unit/test-mux unit/test-caif
649
650 unit_test_common_SOURCES = unit/test-common.c src/common.c src/util.c
651 unit_test_common_LDADD = @GLIB_LIBS@
652 unit_objects += $(unit_test_common_OBJECTS)
653
654 unit_test_util_SOURCES = unit/test-util.c src/util.c
655 unit_test_util_LDADD = @GLIB_LIBS@
656 unit_objects += $(unit_test_utils_OBJECTS)
657
658 unit_test_idmap_SOURCES = unit/test-idmap.c src/idmap.c
659 unit_test_idmap_LDADD = @GLIB_LIBS@
660 unit_objects += $(unit_test_idmap_OBJECTS)
661
662 unit_test_simutil_SOURCES = unit/test-simutil.c src/util.c \
663                                 src/simutil.c src/smsutil.c src/storage.c
664 unit_test_simutil_LDADD = @GLIB_LIBS@
665 unit_objects += $(unit_test_simutil_OBJECTS)
666
667 unit_test_stkutil_SOURCES = unit/test-stkutil.c src/util.c \
668                                 src/storage.c src/smsutil.c \
669                                 src/simutil.c src/stkutil.c
670 unit_test_stkutil_LDADD = @GLIB_LIBS@
671 unit_objects += $(unit_test_stkutil_OBJECTS)
672
673 unit_test_sms_SOURCES = unit/test-sms.c src/util.c src/smsutil.c src/storage.c
674 unit_test_sms_LDADD = @GLIB_LIBS@
675 unit_objects += $(unit_test_sms_OBJECTS)
676
677 unit_test_cdmasms_SOURCES = unit/test-cdmasms.c src/cdma-smsutil.c
678 unit_test_cdmasms_LDADD = @GLIB_LIBS@
679 unit_objects += $(unit_test_cdmasms_OBJECTS)
680
681 unit_test_sms_root_SOURCES = unit/test-sms.c src/util.c src/smsutil.c src/storage.c
682 unit_test_sms_root_LDADD = @GLIB_LIBS@
683 unit_objects += $(unit_test_sms_root_OBJECTS)
684
685 unit_test_mux_SOURCES = unit/test-mux.c $(gatchat_sources)
686 unit_test_mux_LDADD = @GLIB_LIBS@
687 unit_objects += $(unit_test_mux_OBJECTS)
688
689 unit_test_caif_SOURCES = unit/test-caif.c $(gatchat_sources) \
690                                         drivers/stemodem/caif_socket.h \
691                                         drivers/stemodem/if_caif.h
692 unit_test_caif_LDADD = @GLIB_LIBS@
693 unit_objects += $(unit_test_caif_OBJECTS)
694
695 TESTS = $(unit_tests)
696
697 if TOOLS
698 noinst_PROGRAMS += tools/huawei-audio tools/auto-enable \
699                         tools/get-location tools/lookup-apn \
700                         tools/lookup-provider-name
701
702 tools_huawei_audio_SOURCES = $(gdbus_sources) tools/huawei-audio.c
703 tools_huawei_audio_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
704
705 tools_auto_enable_SOURCES = $(gdbus_sources) tools/auto-enable.c
706 tools_auto_enable_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
707
708 tools_get_location_SOURCES = tools/get-location.c
709 tools_get_location_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
710
711 tools_lookup_apn_SOURCES = plugins/mbpi.c plugins/mbpi.h tools/lookup-apn.c
712 tools_lookup_apn_LDADD = @GLIB_LIBS@
713
714 tools_lookup_provider_name_SOURCES = plugins/mbpi.c plugins/mbpi.h \
715                                 tools/lookup-provider-name.c
716 tools_lookup_provider_name_LDADD = @GLIB_LIBS@
717
718 if QMIMODEM
719 noinst_PROGRAMS += tools/qmi
720
721 tools_qmi_SOURCES = $(qmi_sources) tools/qmi.c
722 tools_qmi_LDADD = @GLIB_LIBS@
723 endif
724 endif
725
726 if DUNDEE
727 sbin_PROGRAMS += dundee/dundee
728
729 dundee_dundee_SOURCES = $(gdbus_sources) $(gatchat_sources) $(btio_sources) \
730                         src/log.c src/dbus.c plugins/bluetooth.c \
731                         dundee/dundee.h dundee/main.c dundee/dbus.c \
732                         dundee/manager.c dundee/device.c dundee/bluetooth.c
733
734 dundee_dundee_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ -ldl
735
736 if DATAFILES
737 dist_dbusconf_DATA += dundee/dundee.conf
738
739 if SYSTEMD
740 systemdunit_DATA += dundee/dundee.service
741 endif
742 endif
743
744 endif
745
746 noinst_PROGRAMS += gatchat/gsmdial gatchat/test-server gatchat/test-qcdm
747
748 gatchat_gsmdial_SOURCES = gatchat/gsmdial.c $(gatchat_sources)
749 gatchat_gsmdial_LDADD = @GLIB_LIBS@
750
751 gatchat_test_server_SOURCES = gatchat/test-server.c $(gatchat_sources)
752 gatchat_test_server_LDADD = @GLIB_LIBS@ -lutil
753
754 gatchat_test_qcdm_SOURCES = gatchat/test-qcdm.c $(gatchat_sources)
755 gatchat_test_qcdm_LDADD = @GLIB_LIBS@
756
757
758 DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles
759
760 MAINTAINERCLEANFILES = Makefile.in \
761         aclocal.m4 configure config.h.in config.sub config.guess \
762         ltmain.sh depcomp compile missing install-sh mkinstalldirs
763
764
765 src/builtin.h: src/genbuiltin config.status
766         $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
767
768 plugins/%.rules:
769         $(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@
770
771 include/ofono/version.h: include/version.h
772         $(AM_V_at)$(MKDIR_P) include/ofono
773         $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
774
775 include/ofono/%.h: $(abs_top_srcdir)/include/%.h
776         $(AM_V_at)$(MKDIR_P) include/ofono
777         $(AM_V_GEN)$(LN_S) $< $@
778
779 clean-local:
780         @$(RM) -rf include/ofono