eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

Makefile.am (22130B)


      1 
      2 AM_MAKEFLAGS = --no-print-directory
      3 
      4 ACLOCAL_AMFLAGS = -I build-aux
      5 
      6 builtin_modules =
      7 builtin_sources =
      8 
      9 if EXTERNAL_ELL
     10 ell_cflags = @ELL_CFLAGS@
     11 ell_ldadd = @ELL_LIBS@
     12 ell_dependencies =
     13 ell_built_sources = ell/shared
     14 else
     15 ell_cflags =
     16 ell_ldadd = ell/libell-internal.la
     17 ell_dependencies = $(ell_ldadd)
     18 ell_built_sources = ell/shared ell/internal ell/ell.h
     19 
     20 noinst_LTLIBRARIES = ell/libell-internal.la
     21 
     22 ell_headers = ell/util.h \
     23 			ell/test.h \
     24 			ell/strv.h \
     25 			ell/utf8.h \
     26 			ell/queue.h \
     27 			ell/hashmap.h \
     28 			ell/string.h \
     29 			ell/settings.h \
     30 			ell/main.h \
     31 			ell/idle.h \
     32 			ell/signal.h \
     33 			ell/timeout.h \
     34 			ell/io.h \
     35 			ell/ringbuf.h \
     36 			ell/log.h \
     37 			ell/checksum.h \
     38 			ell/netlink.h \
     39 			ell/genl.h \
     40 			ell/dbus.h \
     41 			ell/rtnl.h \
     42 			ell/dbus-service.h \
     43 			ell/dbus-client.h \
     44 			ell/hwdb.h \
     45 			ell/cipher.h \
     46 			ell/random.h \
     47 			ell/uintset.h \
     48 			ell/base64.h \
     49 			ell/pem.h \
     50 			ell/tls.h \
     51 			ell/uuid.h \
     52 			ell/key.h \
     53 			ell/file.h \
     54 			ell/dir.h \
     55 			ell/net.h \
     56 			ell/dhcp.h \
     57 			ell/cert.h \
     58 			ell/ecc.h \
     59 			ell/ecdh.h \
     60 			ell/time.h \
     61 			ell/path.h \
     62 			ell/icmp6.h \
     63 			ell/dhcp6.h \
     64 			ell/acd.h \
     65 			ell/cleanup.h \
     66 			ell/netconfig.h \
     67 			ell/sysctl.h \
     68 			ell/notifylist.h \
     69 			ell/minheap.h
     70 
     71 ell_sources = ell/private.h \
     72 			ell/missing.h \
     73 			ell/util.c \
     74 			ell/test-private.h \
     75 			ell/test.c \
     76 			ell/test-dbus.c \
     77 			ell/strv.c \
     78 			ell/utf8.c \
     79 			ell/queue.c \
     80 			ell/hashmap.c \
     81 			ell/string.c \
     82 			ell/settings.c \
     83 			ell/main-private.h \
     84 			ell/main.c \
     85 			ell/idle.c \
     86 			ell/signal.c \
     87 			ell/timeout.c \
     88 			ell/io.c \
     89 			ell/ringbuf.c \
     90 			ell/log.c \
     91 			ell/checksum.c \
     92 			ell/netlink-private.h \
     93 			ell/netlink.c \
     94 			ell/genl.c \
     95 			ell/rtnl-private.h \
     96 			ell/rtnl.c \
     97 			ell/dbus-private.h \
     98 			ell/dbus.c \
     99 			ell/dbus-message.c \
    100 			ell/dbus-util.c \
    101 			ell/dbus-service.c \
    102 			ell/dbus-client.c \
    103 			ell/dbus-name-cache.c \
    104 			ell/dbus-filter.c \
    105 			ell/gvariant-private.h \
    106 			ell/gvariant-util.c \
    107 			ell/siphash-private.h \
    108 			ell/siphash.c \
    109 			ell/hwdb.c \
    110 			ell/cipher.c \
    111 			ell/random.c \
    112 			ell/uintset.c \
    113 			ell/base64.c \
    114 			ell/asn1-private.h \
    115 			ell/pem.c \
    116 			ell/pem-private.h \
    117 			ell/tls-private.h \
    118 			ell/tls.c \
    119 			ell/tls-record.c \
    120 			ell/tls-suites.c \
    121 			ell/tls-extensions.c \
    122 			ell/uuid.c \
    123 			ell/key.c \
    124 			ell/file.c \
    125 			ell/dir.c \
    126 			ell/net-private.h \
    127 			ell/net.c \
    128 			ell/dhcp-private.h \
    129 			ell/dhcp.c \
    130 			ell/dhcp-transport.c \
    131 			ell/dhcp-lease.c \
    132 			ell/dhcp-util.c \
    133 			ell/dhcp-server.c \
    134 			ell/cert-private.h \
    135 			ell/cert.c \
    136 			ell/cert-crypto.c \
    137 			ell/ecc-external.c \
    138 			ell/ecc-private.h \
    139 			ell/ecc.c \
    140 			ell/ecdh.c \
    141 			ell/time.c \
    142 			ell/time-private.h \
    143 			ell/path.c \
    144 			ell/dhcp6.c \
    145 			ell/dhcp6-private.h \
    146 			ell/icmp6.c \
    147 			ell/icmp6-private.h \
    148 			ell/dhcp6-lease.c \
    149 			ell/dhcp6-transport.c \
    150 			ell/acd.c \
    151 			ell/netconfig.c \
    152 			ell/sysctl.c \
    153 			ell/notifylist.c \
    154 			ell/minheap.c
    155 
    156 ell_shared = ell/useful.h ell/asn1-private.h
    157 
    158 ell_libell_internal_la_SOURCES = $(ell_headers) $(ell_sources) $(ell_shared)
    159 endif
    160 
    161 if LIBEDIT
    162 client_cflags = $(LIBEDIT_CFLAGS)
    163 client_ldadd = $(LIBEDIT_LIBS)
    164 else
    165 client_cflags =
    166 client_ldadd = $(READLINE_LIBS)
    167 endif
    168 
    169 bin_PROGRAMS =
    170 libexec_PROGRAMS =
    171 noinst_PROGRAMS =
    172 
    173 if DBUS_POLICY
    174 dbus_datadir = @DBUS_DATADIR@/dbus-1/system.d
    175 dist_dbus_data_DATA =
    176 
    177 
    178 dbus_busdir = @DBUS_BUSDIR@
    179 dbus_bus_DATA =
    180 endif
    181 
    182 if SYSTEMD_SERVICE
    183 systemd_unitdir = @SYSTEMD_UNITDIR@
    184 systemd_unit_DATA =
    185 
    186 systemd_networkdir = @SYSTEMD_NETWORKDIR@
    187 systemd_network_DATA =
    188 
    189 systemd_modloaddir = @SYSTEMD_MODLOADDIR@
    190 systemd_modload_DATA = src/pkcs8.conf
    191 endif
    192 
    193 if MANUAL_PAGES
    194 man_MANS =
    195 endif
    196 
    197 manual_pages = src/iwd.8 src/iwd.debug.7 src/iwd.config.5 src/iwd.network.5 \
    198 		src/iwd.ap.5 client/iwctl.1 monitor/iwmon.1 wired/ead.8 \
    199 		tools/hwsim.1
    200 
    201 eap_sources = src/eap.c src/eap.h src/eap-private.h \
    202 				src/eap-md5.c \
    203 				src/eap-tls.c \
    204 				src/eap-ttls.c \
    205 				src/eap-mschapv2.c src/eap-mschapv2.h \
    206 				src/eap-sim.c \
    207 				src/eap-aka.c \
    208 				src/eap-peap.c \
    209 				src/eap-gtc.c \
    210 				src/eap-pwd.c \
    211 				src/util.h src/util.c \
    212 				src/crypto.h src/crypto.c \
    213 				src/simutil.h src/simutil.c \
    214 				src/simauth.h src/simauth.c \
    215 				src/watchlist.h src/watchlist.c \
    216 				src/eap-tls-common.h src/eap-tls-common.c \
    217 				src/mschaputil.h src/mschaputil.c
    218 
    219 if DAEMON
    220 libexec_PROGRAMS += src/iwd
    221 
    222 src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h \
    223 					src/missing.h src/defs.h \
    224 					src/netdev.h src/netdev.c \
    225 					src/wiphy.h src/wiphy.c \
    226 					src/device.c \
    227 					src/station.h src/station.c \
    228 					src/ie.h src/ie.c \
    229 					src/dbus.h src/dbus.c \
    230 					src/mpdu.h src/mpdu.c \
    231 					src/eapol.h src/eapol.c \
    232 					src/eapolutil.h src/eapolutil.c \
    233 					src/handshake.h src/handshake.c \
    234 					src/scan.h src/scan.c \
    235 					src/common.h src/common.c \
    236 					src/agent.h src/agent.c \
    237 					src/storage.h src/storage.c \
    238 					src/network.h src/network.c \
    239 					src/wsc.h src/wsc.c \
    240 					src/backtrace.h src/backtrace.c \
    241 					src/knownnetworks.h \
    242 					src/knownnetworks.c \
    243 					src/rfkill.h src/rfkill.c \
    244 					src/ft.h src/ft.c \
    245 					src/ap.h src/ap.c src/adhoc.c \
    246 					src/sae.h src/sae.c \
    247 					src/nl80211util.h src/nl80211util.c \
    248 					src/nl80211cmd.h src/nl80211cmd.c \
    249 					src/owe.h src/owe.c \
    250 					src/blacklist.h src/blacklist.c \
    251 					src/manager.c \
    252 					src/erp.h src/erp.c \
    253 					src/fils.h src/fils.c \
    254 					src/auth-proto.h \
    255 					src/anqp.h src/anqp.c \
    256 					src/anqputil.h src/anqputil.c \
    257 					src/netconfig.h src/netconfig.c\
    258 					src/netconfig-commit.c \
    259 					src/resolve.h src/resolve.c \
    260 					src/hotspot.c \
    261 					src/p2p.h src/p2p.c \
    262 					src/p2putil.h src/p2putil.c \
    263 					src/module.h src/module.c \
    264 					src/rrm.c \
    265 					src/frame-xchg.h src/frame-xchg.c \
    266 					src/eap-wsc.c src/eap-wsc.h \
    267 					src/wscutil.h src/wscutil.c \
    268 					src/diagnostic.h src/diagnostic.c \
    269 					src/ip-pool.h src/ip-pool.c \
    270 					src/band.h src/band.c \
    271 					src/sysfs.h src/sysfs.c \
    272 					src/offchannel.h src/offchannel.c \
    273 					src/dpp-util.h src/dpp-util.c \
    274 					src/json.h src/json.c \
    275 					src/dpp.c \
    276 					src/udev.c \
    277 					src/pmksa.h src/pmksa.c \
    278 					src/vendor_quirks.h \
    279 					src/vendor_quirks.c \
    280 					$(eap_sources) \
    281 					$(builtin_sources)
    282 
    283 src_iwd_LDADD = $(ell_ldadd) -ldl
    284 src_iwd_DEPENDENCIES = $(ell_dependencies)
    285 
    286 if OFONO
    287 builtin_modules += ofono
    288 builtin_sources += src/ofono.c
    289 endif
    290 
    291 if DBUS_POLICY
    292 dist_dbus_data_DATA += src/iwd-dbus.conf
    293 dbus_bus_DATA += src/net.connman.iwd.service
    294 endif
    295 
    296 if SYSTEMD_SERVICE
    297 src_iwd_DEPENDENCIES += src/iwd.service
    298 
    299 systemd_unit_DATA += src/iwd.service
    300 
    301 systemd_network_DATA += src/80-iwd.link
    302 endif
    303 
    304 if MANUAL_PAGES
    305 man_MANS += src/iwd.8 src/iwd.debug.7 src/iwd.config.5 src/iwd.network.5 \
    306 		src/iwd.ap.5
    307 endif
    308 endif
    309 
    310 if CLIENT
    311 bin_PROGRAMS += client/iwctl
    312 
    313 client_iwctl_SOURCES = client/main.c \
    314 			client/adapter.c \
    315 			client/agent.h client/agent.c \
    316 			client/agent-manager.h client/agent-manager.c \
    317 			client/ad-hoc.c \
    318 			client/ap.c \
    319 			client/command.h client/command.c \
    320 			client/dbus-proxy.h client/dbus-proxy.c \
    321 			client/device.h client/device.c \
    322 			client/display.h client/display.c \
    323 			client/known-networks.c \
    324 			client/network.h client/network.c \
    325 			client/properties.h client/properties.c \
    326 			client/wsc.c client/station.c \
    327 			client/diagnostic.c client/diagnostic.h \
    328 			client/daemon.c client/daemon.h \
    329 			client/dpp.c client/dpp-pkex.c \
    330 			client/station-debug.c \
    331 			client/bss.c \
    332 			src/util.c src/util.h \
    333 			src/band.c src/band.h
    334 
    335 client_iwctl_LDADD = $(ell_ldadd) $(client_ldadd)
    336 
    337 if MANUAL_PAGES
    338 man_MANS += client/iwctl.1
    339 endif
    340 endif
    341 
    342 if MONITOR
    343 bin_PROGRAMS += monitor/iwmon
    344 
    345 monitor_iwmon_SOURCES = monitor/main.c linux/nl80211.h \
    346 					monitor/nlmon.h monitor/nlmon.c \
    347 					monitor/pcap.h monitor/pcap.c \
    348 					monitor/display.h monitor/display.c \
    349 					src/ie.h src/ie.c \
    350 					src/wscutil.h src/wscutil.c \
    351 					src/mpdu.h src/mpdu.c \
    352 					src/util.h src/util.c \
    353 					src/crypto.h src/crypto.c \
    354 					src/watchlist.h src/watchlist.c \
    355 					src/eapolutil.h src/eapolutil.c \
    356 					src/nl80211cmd.h src/nl80211cmd.c \
    357 					src/p2putil.c src/p2putil.h \
    358 					src/anqputil.h src/anqputil.c \
    359 					src/band.h src/band.c
    360 monitor_iwmon_LDADD = $(ell_ldadd)
    361 
    362 if MANUAL_PAGES
    363 man_MANS += monitor/iwmon.1
    364 endif
    365 endif
    366 
    367 if WIRED
    368 libexec_PROGRAMS += wired/ead
    369 
    370 wired_ead_SOURCES = wired/main.c wired/ethdev.h wired/ethdev.c \
    371 				wired/network.h wired/network.c \
    372 				wired/dbus.h wired/dbus.c \
    373 				src/module.h src/module.c \
    374 				src/band.h src/band.c \
    375 				$(eap_sources)
    376 wired_ead_LDADD = $(ell_ldadd)
    377 wired_ead_DEPENDENCIES = $(ell_dependencies)
    378 
    379 if DBUS_POLICY
    380 dist_dbus_data_DATA += wired/ead-dbus.conf
    381 dbus_bus_DATA += wired/net.connman.ead.service
    382 endif
    383 
    384 if SYSTEMD_SERVICE
    385 wired_ead_DEPENDENCIES += wired/ead.service
    386 
    387 systemd_unit_DATA += wired/ead.service
    388 endif
    389 
    390 if MANUAL_PAGES
    391 man_MANS += wired/ead.8
    392 endif
    393 endif
    394 
    395 if TOOLS
    396 if DAEMON
    397 noinst_PROGRAMS += tools/probe-req tools/iwd-decrypt-profile
    398 
    399 tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
    400 					src/ie.h src/ie.c \
    401 					src/nl80211util.h src/nl80211util.c \
    402 					src/util.h src/util.c \
    403 					src/common.h src/common.c \
    404 					src/band.h src/band.c
    405 tools_probe_req_LDADD = $(ell_ldadd)
    406 
    407 tools_iwd_decrypt_profile_SOURCES = tools/iwd-decrypt-profile.c \
    408 					src/common.h src/common.c \
    409 					src/crypto.h src/crypto.c \
    410 					src/storage.h src/storage.c
    411 tools_iwd_decrypt_profile_LDADD = ${ell_ldadd}
    412 endif
    413 endif
    414 
    415 if HWSIM
    416 bin_PROGRAMS += tools/hwsim
    417 
    418 tools_hwsim_SOURCES = tools/hwsim.c src/mpdu.h \
    419 					src/util.h src/util.c \
    420 					src/nl80211cmd.h src/nl80211cmd.c \
    421 					src/nl80211util.h src/nl80211util.c \
    422 					src/storage.h src/storage.c \
    423 					src/common.h src/common.c \
    424 					src/band.h src/band.c \
    425 					src/ie.h src/ie.c \
    426 					src/crypto.h src/crypto.c
    427 tools_hwsim_LDADD = $(ell_ldadd)
    428 
    429 if DBUS_POLICY
    430 dist_dbus_data_DATA += tools/hwsim-dbus.conf
    431 endif
    432 
    433 if MANUAL_PAGES
    434 man_MANS += tools/hwsim.1
    435 endif
    436 endif
    437 
    438 unit_tests =
    439 
    440 if DAEMON
    441 unit_tests += unit/test-cmac-aes \
    442 		unit/test-hmac-md5 unit/test-hmac-sha1 unit/test-hmac-sha256 \
    443 		unit/test-prf-sha1 unit/test-kdf-sha256 \
    444 		unit/test-crypto unit/test-eapol unit/test-mpdu \
    445 		unit/test-ie unit/test-util unit/test-ssid-security \
    446 		unit/test-arc4 unit/test-wsc unit/test-eap-mschapv2 \
    447 		unit/test-eap-sim unit/test-sae unit/test-p2p unit/test-band \
    448 		unit/test-dpp unit/test-json unit/test-nl80211util \
    449 		unit/test-pmksa unit/test-storage
    450 endif
    451 
    452 if CLIENT
    453 unit_tests += unit/test-client
    454 endif
    455 
    456 if MAINTAINER_MODE
    457 noinst_PROGRAMS += $(unit_tests)
    458 endif
    459 
    460 if DAEMON
    461 unit_test_eap_sim_SOURCES = unit/test-eap-sim.c \
    462 		src/crypto.h src/crypto.c src/simutil.h src/simutil.c \
    463 		src/ie.h src/ie.c \
    464 		src/watchlist.h src/watchlist.c \
    465 		src/eapol.h src/eapol.c \
    466 		src/eapolutil.h src/eapolutil.c \
    467 		src/handshake.h src/handshake.c \
    468 		src/pmksa.h src/pmksa.c \
    469 		src/eap.h src/eap.c src/eap-private.h \
    470 		src/util.h src/util.c \
    471 		src/simauth.h src/simauth.c \
    472 		src/erp.h src/erp.c \
    473 		src/band.h src/band.c \
    474 		src/eap-sim.c
    475 unit_test_eap_sim_LDADD = $(ell_ldadd)
    476 
    477 unit_test_cmac_aes_SOURCES = unit/test-cmac-aes.c \
    478 					src/crypto.h src/crypto.c
    479 unit_test_cmac_aes_LDADD = $(ell_ldadd)
    480 
    481 unit_test_arc4_SOURCES = unit/test-arc4.c \
    482 					src/crypto.h src/crypto.c
    483 unit_test_arc4_LDADD = $(ell_ldadd)
    484 
    485 unit_test_hmac_md5_SOURCES = unit/test-hmac-md5.c \
    486 					src/crypto.h src/crypto.c
    487 unit_test_hmac_md5_LDADD = $(ell_ldadd)
    488 
    489 unit_test_hmac_sha1_SOURCES = unit/test-hmac-sha1.c \
    490 					src/crypto.h src/crypto.c
    491 unit_test_hmac_sha1_LDADD = $(ell_ldadd)
    492 
    493 unit_test_hmac_sha256_SOURCES = unit/test-hmac-sha256.c \
    494 					src/crypto.h src/crypto.c
    495 unit_test_hmac_sha256_LDADD = $(ell_ldadd)
    496 
    497 unit_test_prf_sha1_SOURCES = unit/test-prf-sha1.c \
    498 					src/crypto.h src/crypto.c
    499 unit_test_prf_sha1_LDADD = $(ell_ldadd)
    500 
    501 unit_test_kdf_sha256_SOURCES = unit/test-kdf-sha256.c \
    502 					src/crypto.h src/crypto.c
    503 unit_test_kdf_sha256_LDADD = $(ell_ldadd)
    504 
    505 unit_test_ie_SOURCES = unit/test-ie.c src/ie.h src/ie.c
    506 unit_test_ie_LDADD = $(ell_ldadd)
    507 
    508 unit_test_band_SOURCES = unit/test-band.c src/band.h src/band.c src/netdev.h \
    509 					src/ie.h src/ie.c
    510 unit_test_band_LDADD = $(ell_ldadd)
    511 
    512 unit_test_crypto_SOURCES = unit/test-crypto.c \
    513 				src/crypto.h src/crypto.c
    514 unit_test_crypto_LDADD = $(ell_ldadd)
    515 
    516 unit_test_mpdu_SOURCES = unit/test-mpdu.c \
    517 				src/mpdu.h src/mpdu.c \
    518 				src/ie.h src/ie.c
    519 unit_test_mpdu_LDADD = $(ell_ldadd)
    520 
    521 unit_test_eapol_SOURCES = unit/test-eapol.c \
    522 				src/crypto.h src/crypto.c \
    523 				src/ie.h src/ie.c \
    524 				src/watchlist.h src/watchlist.c \
    525 				src/eapol.h src/eapol.c \
    526 				src/eapolutil.h src/eapolutil.c \
    527 				src/handshake.h src/handshake.c \
    528 				src/pmksa.h src/pmksa.c \
    529 				src/eap.h src/eap.c src/eap-private.h \
    530 				src/eap-tls.c src/eap-ttls.c \
    531 				src/eap-md5.c src/util.c \
    532 				src/eap-tls-common.h src/eap-tls-common.c \
    533 				src/erp.h src/erp.c \
    534 				src/band.h src/band.c \
    535 				src/mschaputil.h src/mschaputil.c
    536 unit_test_eapol_LDADD = $(ell_ldadd)
    537 unit_test_eapol_DEPENDENCIES = $(ell_dependencies) \
    538 				unit/cert-server.pem \
    539 				unit/cert-server-key-pkcs8.pem \
    540 				unit/cert-client.pem \
    541 				unit/cert-client-key-pkcs8.pem \
    542 				unit/tls-settings.8021x
    543 
    544 unit_test_util_SOURCES = src/util.h src/util.c src/band.c src/band.h \
    545 				unit/test-util.c
    546 unit_test_util_LDADD = $(ell_ldadd)
    547 
    548 unit_test_ssid_security_SOURCES = unit/test-ssid-security.c src/ie.h src/ie.c \
    549 				src/common.h src/common.c
    550 unit_test_ssid_security_LDADD = $(ell_ldadd)
    551 
    552 unit_test_wsc_SOURCES = unit/test-wsc.c src/wscutil.h src/wscutil.c \
    553 				src/crypto.h src/crypto.c \
    554 				src/ie.h src/ie.c \
    555 				src/watchlist.h src/watchlist.c \
    556 				src/eapol.h src/eapol.c \
    557 				src/eapolutil.h src/eapolutil.c \
    558 				src/handshake.h src/handshake.c \
    559 				src/pmksa.h src/pmksa.c \
    560 				src/eap.h src/eap.c src/eap-private.h \
    561 				src/util.h src/util.c \
    562 				src/erp.h src/erp.c \
    563 				src/band.h src/band.c \
    564 				src/eap-wsc.h src/eap-wsc.c
    565 unit_test_wsc_LDADD = $(ell_ldadd)
    566 
    567 unit_test_eap_mschapv2_SOURCES = src/eap-mschapv2.h src/eap-mschapv2.c \
    568 				src/eap.c src/eap.h src/eap-private.h \
    569 				src/mschaputil.h src/mschaputil.c \
    570 				unit/test-eap-mschapv2.c
    571 unit_test_eap_mschapv2_LDADD = $(ell_ldadd)
    572 
    573 unit_test_sae_SOURCES = unit/test-sae.c \
    574 				src/sae.h src/sae.c \
    575 				src/crypto.h src/crypto.c \
    576 				src/ie.h src/ie.c \
    577 				src/handshake.h src/handshake.c \
    578 				src/pmksa.h src/pmksa.c \
    579 				src/erp.h src/erp.c \
    580 				src/band.h src/band.c \
    581 				src/util.h src/util.c \
    582 				src/mpdu.h src/mpdu.c
    583 unit_test_sae_LDADD = $(ell_ldadd)
    584 unit_test_sae_LDFLAGS = -Wl,-wrap,l_ecc_supported_ike_groups
    585 
    586 unit_test_p2p_SOURCES = unit/test-p2p.c src/wscutil.h src/wscutil.c \
    587 				src/crypto.h src/crypto.c \
    588 				src/ie.h src/ie.c \
    589 				src/util.h src/util.c \
    590 				src/p2putil.h src/p2putil.c \
    591 				src/band.h src/band.c
    592 unit_test_p2p_LDADD = $(ell_ldadd)
    593 
    594 unit_test_dpp_SOURCES = unit/test-dpp.c src/dpp-util.h src/dpp-util.c \
    595 				src/band.h src/band.c \
    596 				src/util.h src/util.c src/crypto.h \
    597 				src/crypto.c src/json.h src/json.c
    598 unit_test_dpp_LDADD = $(ell_ldadd)
    599 
    600 unit_test_json_SOURCES = unit/test-json.c src/json.h src/json.c shared/jsmn.h
    601 unit_test_json_LDADD = $(ell_ldadd)
    602 
    603 unit_test_nl80211util_SOURCES = unit/test-nl80211util.c \
    604 				src/nl80211util.h src/nl80211util.c \
    605 				src/band.h src/band.c \
    606 				src/ie.h src/ie.c \
    607 				src/util.h src/util.c
    608 unit_test_nl80211util_LDADD = $(ell_ldadd)
    609 
    610 unit_test_pmksa_SOURCES = unit/test-pmksa.c src/pmksa.c src/pmksa.h \
    611 				src/module.h src/util.h
    612 unit_test_pmksa_LDADD = $(ell_ldadd)
    613 
    614 unit_test_storage_SOURCES = unit/test-storage.c src/storage.c src/storage.h \
    615 				src/crypto.c src/crypto.h \
    616 				src/common.c src/common.h
    617 unit_test_storage_LDADD = $(ell_ldadd)
    618 endif
    619 
    620 if CLIENT
    621 unit_test_client_SOURCES = unit/test-client.c \
    622 				client/adapter.c \
    623 				client/agent.h client/agent.c \
    624 				client/agent-manager.h client/agent-manager.c \
    625 				client/command.h client/command.c \
    626 				client/dbus-proxy.h client/dbus-proxy.c \
    627 				client/display.h client/display.c \
    628 				client/network.h client/network.c \
    629 				client/properties.h client/properties.c
    630 unit_test_client_LDADD = $(ell_ldadd) $(client_ldadd)
    631 endif
    632 
    633 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
    634 			$(top_srcdir)/build-aux/tap-driver.sh
    635 
    636 TESTS = $(unit_tests)
    637 
    638 EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service \
    639 			wired/ead.service.in wired/net.connman.ead.service \
    640 			src/80-iwd.link src/pkcs8.conf unit/gencerts.cnf \
    641 			doc/main.conf \
    642 			$(manual_pages) $(patsubst %.1,%.rst, \
    643 					$(patsubst %.5,%.rst, \
    644 					$(patsubst %.8,%.rst,$(manual_pages))))
    645 
    646 AM_CFLAGS = $(ell_cflags) $(client_cflags) -fvisibility=hidden \
    647 				-DUNITDIR=\""$(top_srcdir)/unit/"\" \
    648 				-DCERTDIR=\""$(top_builddir)/unit/"\"
    649 
    650 if DBUS
    651 AM_CFLAGS += -DHAVE_DBUS
    652 endif
    653 
    654 if MAINTAINER_MODE
    655 AM_CFLAGS += -DHAVE_PKCS8_SUPPORT
    656 endif
    657 
    658 CLEANFILES = src/iwd.service wired/ead.service
    659 
    660 DISTCHECK_CONFIGURE_FLAGS = --disable-dbus-policy --disable-systemd-service \
    661 				--enable-ofono \
    662 				--enable-wired \
    663 				--enable-hwsim \
    664 				--enable-tools
    665 
    666 DISTCLEANFILES = $(BUILT_SOURCES) $(unit_tests) $(manual_pages)
    667 
    668 MAINTAINERCLEANFILES = Makefile.in configure config.h.in aclocal.m4
    669 
    670 true_redirect_openssl = 2>&1
    671 false_redirect_openssl = 2>/dev/null
    672 
    673 unit/cert-ca-key.pem:
    674 	$(AM_V_GEN)openssl genrsa -out $@ 2048 $($(AM_V_P)_redirect_openssl)
    675 
    676 unit/cert-ca.pem: unit/cert-ca-key.pem unit/gencerts.cnf
    677 	$(AM_V_GEN)openssl req -x509 -new -nodes -extensions ca_ext \
    678 			-config $(srcdir)/unit/gencerts.cnf \
    679 			-subj '/O=International Union of Example Organizations/CN=Certificate issuer guy/emailAddress=ca@mail.example' \
    680 			-key $< -sha256 -days 10000 -out $@
    681 
    682 unit/cert-server-key.pem:
    683 	$(AM_V_GEN)openssl genrsa -out $@ $($(AM_V_P)_redirect_openssl)
    684 
    685 unit/cert-server-key-pkcs8.pem: unit/cert-server-key.pem
    686 	$(AM_V_GEN)openssl pkcs8 -topk8 -nocrypt -in $< -out $@
    687 
    688 unit/cert-server.csr: unit/cert-server-key.pem unit/gencerts.cnf
    689 	$(AM_V_GEN)openssl req -new -extensions cert_ext \
    690 			-config $(srcdir)/unit/gencerts.cnf \
    691 			-subj '/O=Foo Example Organization/CN=Foo Example Organization/emailAddress=foo@mail.example' \
    692 			-key $< -out $@
    693 
    694 unit/cert-server.pem: unit/cert-server.csr unit/cert-ca.pem unit/gencerts.cnf
    695 	$(AM_V_GEN)openssl x509 -req -extensions server_ext \
    696 			-extfile $(srcdir)/unit/gencerts.cnf \
    697 			-in $< -CA $(builddir)/unit/cert-ca.pem \
    698 			-CAkey $(builddir)/unit/cert-ca-key.pem \
    699 			-CAserial $(builddir)/unit/cert-ca.srl \
    700 			-CAcreateserial -sha256 -days 10000 -out $@ $($(AM_V_P)_redirect_openssl)
    701 
    702 unit/cert-client-key.pem:
    703 	$(AM_V_GEN)openssl genrsa -out $@ $($(AM_V_P)_redirect_openssl)
    704 
    705 unit/cert-client-key-pkcs8.pem: unit/cert-client-key.pem
    706 	$(AM_V_GEN)openssl pkcs8 -topk8 -nocrypt -in $< -out $@
    707 
    708 unit/cert-client.csr: unit/cert-client-key.pem unit/gencerts.cnf
    709 	$(AM_V_GEN)openssl req -new -extensions cert_ext \
    710 			-config $(srcdir)/unit/gencerts.cnf \
    711 			-subj '/O=Bar Example Organization/CN=Bar Example Organization/emailAddress=bar@mail.example' \
    712 			-key $< -out $@
    713 
    714 unit/cert-client.pem: unit/cert-client.csr unit/cert-ca.pem unit/gencerts.cnf
    715 	$(AM_V_GEN)openssl x509 -req -extensions cert_ext \
    716 			-extfile $(srcdir)/unit/gencerts.cnf \
    717 			-in $< -CA $(builddir)/unit/cert-ca.pem \
    718 			-CAkey $(builddir)/unit/cert-ca-key.pem \
    719 			-CAserial $(builddir)/unit/cert-ca.srl \
    720 			-CAcreateserial -sha256 -days 10000 -out $@ $($(AM_V_P)_redirect_openssl)
    721 
    722 unit/tls-settings.8021x: unit/cert-ca.pem unit/cert-client.pem unit/cert-client-key-pkcs8.pem
    723 	$(AM_V_GEN) \
    724 	$(file >$@,[Security]) \
    725 	$(file >>$@,EAP-Method=TLS) \
    726 	$(file >>$@,EAP-Identity=abc@example.com) \
    727 	$(file >>$@,EAP-TLS-CACert=embed:ca_cert) \
    728 	$(file >>$@,EAP-TLS-ClientCert=embed:client_cert) \
    729 	$(file >>$@,EAP-TLS-ClientKey=embed:client_key) \
    730 	$(file >>$@,[@pem@ca_cert]) \
    731 	$(shell cat unit/cert-ca.pem >> $@) \
    732 	$(file >>$@,[@pem@client_cert]) \
    733 	$(shell cat unit/cert-client.pem >> $@) \
    734 	$(file >>$@,[@pem@client_key]) \
    735 	$(shell cat unit/cert-client-key-pkcs8.pem >> $@)
    736 
    737 BUILT_SOURCES = $(ell_built_sources) src/builtin.h
    738 
    739 ell/shared: Makefile
    740 	$(AM_V_at)$(MKDIR_P) ell
    741 	$(AM_V_GEN)for f in $(ell_shared) ; do \
    742 		if [ ! -f $$f ] ; then \
    743 			$(LN_S) -f $(abs_srcdir)/../ell/$$f ; \
    744 		fi \
    745 	done > $@
    746 
    747 ell/internal: Makefile
    748 	$(AM_V_at)$(MKDIR_P) ell
    749 	$(AM_V_GEN)for f in $(ell_headers) $(ell_sources) ; do \
    750 		if [ ! -f $$f ] ; then \
    751 			$(LN_S) -f $(abs_srcdir)/../ell/$$f ; \
    752 		fi \
    753 	done > $@
    754 
    755 ell/ell.h: Makefile
    756 	$(AM_V_at)$(MKDIR_P) ell
    757 	$(AM_V_at)echo -n > $@
    758 	$(AM_V_GEN)for f in $(ell_headers) ; do \
    759 		echo "#include <$$f>" >> $@ ; \
    760 	done
    761 
    762 SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
    763 		-e 's,@libexecdir\@,$(libexecdir),g' \
    764 		< $< > $@
    765 
    766 if RUN_RST2MAN
    767 RST2MAN_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
    768 			$(RST2MAN) --strict --no-raw \
    769 			--no-generator --no-datestamp $< $@
    770 else
    771 RST2MAN_PROCESS = $(AM_V_GEN)test -f $@ || \
    772 		{ echo "Generated manual page $@ does not exist"; false; }
    773 endif
    774 
    775 %.service: %.service.in Makefile
    776 	$(SED_PROCESS)
    777 
    778 %.1: %.rst Makefile
    779 	$(RST2MAN_PROCESS)
    780 
    781 %.5: %.rst Makefile
    782 	$(RST2MAN_PROCESS)
    783 
    784 %.7: %.rst Makefile
    785 	$(RST2MAN_PROCESS)
    786 
    787 %.8: %.rst Makefile
    788 	$(RST2MAN_PROCESS)
    789 
    790 install-data-local:
    791 if !SYSTEMD_SERVICE
    792 if DAEMON
    793 	$(MKDIR_P) -m 700 $(DESTDIR)$(daemon_storagedir)
    794 endif
    795 if WIRED
    796 	$(MKDIR_P) -m 700 $(DESTDIR)$(wired_storagedir)
    797 endif
    798 endif
    799 
    800 gcov-clean:
    801 if GCOV
    802 	-$(LCOV) --quiet --directory $(builddir) -z
    803 	-rm -rf "$(builddir)/iwd-coverage.info" "$(builddir)/gcov"
    804 	-find . -name "*.gcda" -o -name "*.gcov" -o -name "*.gcno" -delete
    805 endif
    806 
    807 clean-local: gcov-clean
    808 	-rm -f unit/cert-*.pem unit/cert-*.csr unit/cert-*.srl unit/*-settings.8021x
    809 
    810 maintainer-clean-local:
    811 	-rm -rf build-aux ell
    812 
    813 gcov-report:
    814 if GCOV
    815 	$(LCOV) --quiet --directory $(builddir) --capture --output-file "iwd-coverage.info"
    816 	LANG=C $(GENHTML) --quiet --prefix $(builddir) --output-directory "$(builddir)/gcov" --title "iwd Code Coverage" --legend "$(builddir)/iwd-coverage.info"
    817 endif
    818 
    819 src/builtin.h: src/genbuiltin config.status
    820 	$(AM_V_at)$(MKDIR_P) $(@D)
    821 	$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@