forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.dep
894 lines (728 loc) · 19.6 KB
/
Makefile.dep
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
#
OLD_USEMODULE := $(sort $(USEMODULE))
OLD_USEPKG := $(sort $(USEPKG))
# include board dependencies
-include $(RIOTBOARD)/$(BOARD)/Makefile.dep
# include external modules dependencies
# processed before RIOT ones to be evaluated before the 'default' rules.
-include $(EXTERNAL_MODULE_DIRS:%=%/Makefile.dep)
# pull dependencies from sys and drivers
include $(RIOTBASE)/sys/Makefile.dep
include $(RIOTBASE)/drivers/Makefile.dep
ifneq (,$(filter ndn-riot,$(USEPKG)))
USEMODULE += gnrc
USEMODULE += xtimer
USEMODULE += random
USEMODULE += hashes
USEPKG += micro-ecc
endif
ifneq (,$(filter csma_sender,$(USEMODULE)))
USEMODULE += random
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_mac,$(USEMODULE)))
USEMODULE += gnrc_priority_pktqueue
USEMODULE += csma_sender
USEMODULE += evtimer
endif
ifneq (,$(filter gnrc_gomach,$(USEMODULE)))
USEMODULE += gnrc_netif
USEMODULE += random
USEMODULE += xtimer
USEMODULE += gnrc_mac
FEATURES_REQUIRED += periph_rtt
endif
ifneq (,$(filter nhdp,$(USEMODULE)))
USEMODULE += sock_udp
USEMODULE += xtimer
USEMODULE += oonf_rfc5444
endif
ifneq (,$(filter sntp,$(USEMODULE)))
USEMODULE += gnrc_sock_udp
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_netdev_default,$(USEMODULE)))
USEMODULE += netdev_default
USEMODULE += gnrc_netif
endif
ifneq (,$(filter netdev_ieee802154,$(USEMODULE)))
USEMODULE += ieee802154
USEMODULE += random
endif
ifneq (,$(filter gnrc_uhcpc,$(USEMODULE)))
USEMODULE += uhcpc
USEMODULE += gnrc_sock_udp
USEMODULE += fmt
endif
ifneq (,$(filter uhcpc,$(USEMODULE)))
USEMODULE += posix_inet
endif
ifneq (,$(filter nordic_softdevice_ble,$(USEPKG)))
USEMODULE += softdevice_handler
USEMODULE += ble_common
USEMODULE += ble_6lowpan
USEMODULE += gnrc_sixlowpan
USEMODULE += gnrc_sixlowpan_iphc
USEMODULE += gnrc_ipv6_nib_6ln
USEMODULE += gnrc_ipv6_default
# prevent application from being a router
# TODO: maybe find a nicer solution in future build system update
_ROUTER_MODULES = gnrc_ipv6_router% gnrc_rpl netstats_rpl auto_init_gnrc_rpl
ifneq (,$(filter $(_ROUTER_MODULES),$(USEMODULE)))
$(warning nordic_softdevice_ble: Disabling router modules:\
$(filter $(_ROUTER_MODULES),$(USEMODULE)))
endif
USEMODULE := $(filter-out $(_ROUTER_MODULES),$(USEMODULE))
endif
ifneq (,$(filter gnrc_%,$(filter-out gnrc_netapi gnrc_netreg gnrc_netif% gnrc_pkt%,$(USEMODULE))))
USEMODULE += gnrc
endif
ifneq (,$(filter gnrc_sock_%,$(USEMODULE)))
USEMODULE += gnrc_sock
endif
ifneq (,$(filter gnrc_sock_ip,$(USEMODULE)))
USEMODULE += sock_ip
endif
ifneq (,$(filter gnrc_sock_udp,$(USEMODULE)))
USEMODULE += gnrc_udp
USEMODULE += random # to generate random ports
USEMODULE += sock_udp
endif
ifneq (,$(filter gnrc_sock,$(USEMODULE)))
USEMODULE += gnrc_netapi_mbox
USEMODULE += sock
endif
ifneq (,$(filter gnrc_netapi_mbox,$(USEMODULE)))
USEMODULE += core_mbox
endif
ifneq (,$(filter netdev_tap,$(USEMODULE)))
USEMODULE += netif
USEMODULE += netdev_eth
USEMODULE += iolist
endif
ifneq (,$(filter gnrc_tftp,$(USEMODULE)))
USEMODULE += gnrc_udp
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_rpl_p2p,$(USEMODULE)))
USEMODULE += gnrc_rpl
endif
ifneq (,$(filter gnrc_rpl,$(USEMODULE)))
USEMODULE += gnrc_icmpv6
USEMODULE += gnrc_ipv6_nib
USEMODULE += trickle
USEMODULE += xtimer
USEMODULE += evtimer
endif
ifneq (,$(filter trickle,$(USEMODULE)))
USEMODULE += random
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_netif,$(USEMODULE)))
USEMODULE += netif
USEMODULE += l2util
USEMODULE += fmt
ifneq (,$(filter netdev_ieee802154,$(USEMODULE)))
USEMODULE += gnrc_netif_ieee802154
endif
ifneq (,$(filter netdev_eth,$(USEMODULE)))
USEMODULE += gnrc_netif_ethernet
endif
endif
ifneq (,$(filter ieee802154 nrfmin esp_now gnrc_sixloenc,$(USEMODULE)))
ifneq (,$(filter gnrc_ipv6, $(USEMODULE)))
USEMODULE += gnrc_sixlowpan
endif
ifneq (,$(filter gnrc_ipv6_router, $(USEMODULE)))
USEMODULE += gnrc_sixlowpan_router
endif
ifneq (,$(filter gnrc_ipv6_default, $(USEMODULE)))
USEMODULE += gnrc_sixlowpan_default
endif
ifneq (,$(filter gnrc_ipv6_router_default, $(USEMODULE)))
USEMODULE += gnrc_sixlowpan_router_default
endif
ifneq (,$(filter lwip%, $(USEMODULE)))
USEMODULE += lwip_sixlowpan
endif
endif
ifneq (,$(filter gnrc_sixlowpan_default,$(USEMODULE)))
USEMODULE += gnrc_ipv6_default
USEMODULE += gnrc_ipv6_nib_6ln
USEMODULE += gnrc_sixlowpan
USEMODULE += gnrc_sixlowpan_frag
USEMODULE += gnrc_sixlowpan_iphc
endif
ifneq (,$(filter gnrc_sixlowpan_router_default,$(USEMODULE)))
USEMODULE += gnrc_ipv6_router_default
USEMODULE += gnrc_ipv6_nib_6lr
USEMODULE += gnrc_sixlowpan_router
USEMODULE += gnrc_sixlowpan_frag
USEMODULE += gnrc_sixlowpan_iphc
endif
ifneq (,$(filter gnrc_sixlowpan_border_router_default,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib_6lbr
USEMODULE += gnrc_ipv6_router_default
USEMODULE += gnrc_sixlowpan_router
USEMODULE += gnrc_sixlowpan_frag
USEMODULE += gnrc_sixlowpan_iphc
endif
ifneq (,$(filter gnrc_sixlowpan_router,$(USEMODULE)))
USEMODULE += gnrc_ipv6_router
endif
ifneq (,$(filter gnrc_sixlowpan_frag,$(USEMODULE)))
USEMODULE += gnrc_sixlowpan
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_sixlowpan_iphc,$(USEMODULE)))
USEMODULE += gnrc_ipv6
USEMODULE += gnrc_sixlowpan
USEMODULE += gnrc_sixlowpan_ctx
USEMODULE += gnrc_sixlowpan_iphc_nhc
endif
ifneq (,$(filter gnrc_sixlowpan,$(USEMODULE)))
USEMODULE += sixlowpan
endif
ifneq (,$(filter gnrc_sixlowpan_ctx,$(USEMODULE)))
USEMODULE += ipv6_addr
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_ipv6_default,$(USEMODULE)))
USEMODULE += gnrc_ipv6
USEMODULE += gnrc_icmpv6
endif
ifneq (,$(filter gnrc_ipv6_router_default,$(USEMODULE)))
USEMODULE += gnrc_ipv6_router
USEMODULE += gnrc_icmpv6
endif
ifneq (,$(filter gnrc_ndp,$(USEMODULE)))
USEMODULE += gnrc_icmpv6
USEMODULE += gnrc_netif
endif
ifneq (,$(filter gnrc_icmpv6_echo,$(USEMODULE)))
USEMODULE += gnrc_icmpv6
endif
ifneq (,$(filter gnrc_icmpv6_error,$(USEMODULE)))
USEMODULE += gnrc_icmpv6
endif
ifneq (,$(filter gnrc_icmpv6,$(USEMODULE)))
USEMODULE += inet_csum
USEMODULE += gnrc_ipv6
USEMODULE += icmpv6
endif
ifneq (,$(filter gnrc_rpl_srh,$(USEMODULE)))
USEMODULE += gnrc_ipv6_ext_rh
endif
ifneq (,$(filter gnrc_ipv6_ext_rh,$(USEMODULE)))
USEMODULE += gnrc_ipv6_ext
endif
ifneq (,$(filter gnrc_ipv6_ext,$(USEMODULE)))
USEMODULE += gnrc_ipv6
endif
ifneq (,$(filter gnrc_ipv6_whitelist,$(USEMODULE)))
USEMODULE += ipv6_addr
endif
ifneq (,$(filter gnrc_ipv6_blacklist,$(USEMODULE)))
USEMODULE += ipv6_addr
endif
ifneq (,$(filter gnrc_ipv6_router,$(USEMODULE)))
USEMODULE += gnrc_ipv6
USEMODULE += gnrc_ipv6_nib_router
endif
ifneq (,$(filter gnrc_ipv6,$(USEMODULE)))
USEMODULE += inet_csum
USEMODULE += ipv6_addr
USEMODULE += gnrc_ipv6_hdr
USEMODULE += gnrc_ipv6_nib
USEMODULE += gnrc_netif
endif
ifneq (,$(filter gnrc_ipv6_hdr,$(USEMODULE)))
USEMODULE += ipv6_hdr
USEMODULE += gnrc_pktbuf
endif
ifneq (,$(filter sixlowpan,$(USEMODULE)))
USEMODULE += ipv6_hdr
endif
ifneq (,$(filter ipv6_hdr,$(USEMODULE)))
USEMODULE += inet_csum
USEMODULE += ipv6_addr
endif
ifneq (,$(filter gnrc_ipv6_nib_6lbr,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib_6lr
endif
ifneq (,$(filter gnrc_ipv6_nib_6lr,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib_6ln
USEMODULE += gnrc_ipv6_nib_router
endif
ifneq (,$(filter gnrc_ipv6_nib_6ln,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib
USEMODULE += gnrc_sixlowpan_nd
endif
ifneq (,$(filter gnrc_ipv6_nib_dns,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib
endif
ifneq (,$(filter gnrc_ipv6_nib_router,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib
endif
ifneq (,$(filter gnrc_ipv6_nib,$(USEMODULE)))
USEMODULE += evtimer
USEMODULE += gnrc_ndp
USEMODULE += gnrc_netif
USEMODULE += ipv6_addr
USEMODULE += random
ifneq (,$(filter sock_dns,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib_dns
endif
endif
ifneq (,$(filter gnrc_udp,$(USEMODULE)))
USEMODULE += inet_csum
USEMODULE += udp
endif
ifneq (,$(filter gnrc_tcp,$(USEMODULE)))
USEMODULE += inet_csum
USEMODULE += random
USEMODULE += tcp
USEMODULE += xtimer
USEMODULE += core_mbox
endif
ifneq (,$(filter gnrc_nettest,$(USEMODULE)))
USEMODULE += gnrc_netapi
USEMODULE += gnrc_netreg
USEMODULE += gnrc_netif
USEMODULE += gnrc_pktbuf
USEMODULE += xtimer
endif
ifneq (,$(filter gnrc_pktdump,$(USEMODULE)))
USEMODULE += gnrc_pktbuf
USEMODULE += od
endif
ifneq (,$(filter od,$(USEMODULE)))
USEMODULE += fmt
endif
ifneq (,$(filter od_string,$(USEMODULE)))
USEMODULE += od
endif
ifneq (,$(filter newlib_gnu_source,$(USEMODULE)))
USEMODULE += newlib
endif
ifneq (,$(filter newlib_nano,$(USEMODULE)))
USEMODULE += newlib
endif
ifneq (,$(filter newlib,$(USEMODULE)))
# allow custom newlib syscalls implementations by adding
# newlib_syscalls_XXX to USEMODULE
ifeq (,$(filter newlib_syscalls_%,$(USEMODULE)))
USEMODULE += newlib_syscalls_default
endif
ifeq (,$(filter stdio_rtt,$(USEMODULE)))
USEMODULE += stdio_uart
endif
endif
ifneq (,$(filter posix_sockets,$(USEMODULE)))
USEMODULE += bitfield
USEMODULE += random
USEMODULE += vfs
USEMODULE += posix_headers
USEMODULE += xtimer
endif
ifneq (,$(filter stdio_rtt,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter shell,$(USEMODULE)))
ifneq (,$(filter stdio_uart,$(USEMODULE)))
USEMODULE += stdio_uart_rx
endif
endif
ifneq (,$(filter stdio_uart_rx,$(USEMODULE)))
USEMODULE += isrpipe
USEMODULE += stdio_uart
endif
ifneq (,$(filter stdio_uart,$(USEMODULE)))
FEATURES_REQUIRED += periph_uart
endif
ifneq (,$(filter isrpipe,$(USEMODULE)))
USEMODULE += tsrb
endif
ifneq (,$(filter isrpipe_read_timeout,$(USEMODULE)))
USEMODULE += isrpipe
USEMODULE += xtimer
endif
ifneq (,$(filter shell_commands,$(USEMODULE)))
ifneq (,$(filter fib,$(USEMODULE)))
USEMODULE += posix_inet
endif
endif
ifneq (,$(filter posix_semaphore,$(USEMODULE)))
USEMODULE += sema
USEMODULE += xtimer
USEMODULE += posix_headers
endif
ifneq (,$(filter posix_time,$(USEMODULE)))
USEMODULE += xtimer
USEMODULE += posix_headers
endif
ifneq (,$(filter posix_inet,$(USEMODULE)))
USEMODULE += posix_headers
endif
ifneq (,$(filter lwip_sixlowpan,$(USEMODULE)))
USEMODULE += lwip_ipv6_autoconfig
USEMODULE += l2util
endif
ifneq (,$(filter lwip_ipv6_autoconfig lwip_ipv6_mld,$(USEMODULE)))
USEMODULE += lwip_ipv6
endif
ifneq (,$(filter lwip_ipv6,$(USEMODULE)))
USEMODULE += random
endif
ifneq (,$(filter lwip_udplite,$(USEMODULE)))
USEMODULE += lwip_udp
endif
ifneq (,$(filter lwip_sock_%,$(USEMODULE)))
USEMODULE += lwip_sock
endif
ifneq (,$(filter lwip_sock_ip,$(USEMODULE)))
USEMODULE += lwip_raw
USEMODULE += sock_ip
endif
ifneq (,$(filter lwip_sock_tcp,$(USEMODULE)))
USEMODULE += lwip_tcp
USEMODULE += sock_tcp
endif
ifneq (,$(filter lwip_sock_udp,$(USEMODULE)))
USEMODULE += lwip_udp
USEMODULE += sock_udp
endif
ifneq (,$(filter lwip_%,$(USEMODULE)))
USEPKG += lwip
USEMODULE += core_mbox
USEMODULE += lwip_api
USEMODULE += lwip_contrib
USEMODULE += lwip_core
USEMODULE += lwip_netif
ifeq (,$(filter lwip_ipv4 lwip_ipv6,$(USEMODULE)))
USEMODULE += lwip_ipv4
endif
ifeq (,$(filter lwip_tcp lwip_udp lwip_udplite,$(USEMODULE)))
USEMODULE += lwip_raw
endif
ifneq (,$(filter netdev_eth,$(USEMODULE)))
USEMODULE += lwip_ethernet
endif
endif
ifneq (,$(filter lwip_ppp,$(USEMODULE)))
USEMODULE += lwip_polarssl
endif
ifneq (,$(filter lwip_contrib,$(USEMODULE)))
USEMODULE += sema
USEMODULE += xtimer
endif
ifneq (,$(filter sema,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter libfixmath-unittests,$(USEMODULE)))
USEPKG += libfixmath
USEMODULE += libfixmath
endif
ifneq (,$(filter luid,$(USEMODULE)))
FEATURES_OPTIONAL += periph_cpuid
endif
ifneq (,$(filter fib,$(USEMODULE)))
USEMODULE += universal_address
USEMODULE += xtimer
USEMODULE += posix_headers
endif
ifneq (,$(filter oonf_rfc5444,$(USEMODULE)))
USEMODULE += oonf_common
endif
ifneq (,$(filter oonf_common,$(USEMODULE)))
USEPKG += oonf_api
USEMODULE += posix_sockets
endif
# if any log_* is used, also use LOG pseudomodule
ifneq (,$(filter log_%,$(USEMODULE)))
USEMODULE += log
endif
ifneq (,$(filter cpp11-compat,$(USEMODULE)))
USEMODULE += xtimer
USEMODULE += timex
FEATURES_REQUIRED += cpp
endif
ifneq (,$(filter gnrc,$(USEMODULE)))
USEMODULE += gnrc_netapi
USEMODULE += gnrc_netreg
USEMODULE += gnrc_netif
USEMODULE += gnrc_netif_hdr
USEMODULE += gnrc_pktbuf
endif
ifneq (,$(filter gnrc_pktbuf, $(USEMODULE)))
ifeq (,$(filter gnrc_pktbuf_%, $(USEMODULE)))
USEMODULE += gnrc_pktbuf_static
endif
ifeq (gnrc_pktbuf_cmd,$(filter gnrc_pktbuf_%, $(USEMODULE)))
USEMODULE += gnrc_pktbuf_static
endif
USEMODULE += gnrc_pkt
endif
ifneq (,$(filter gnrc_pktbuf_%, $(USEMODULE)))
USEMODULE += gnrc_pktbuf # make MODULE_GNRC_PKTBUF macro available for all implementations
endif
ifneq (,$(filter gnrc_netif_%,$(USEMODULE)))
USEMODULE += gnrc_netif
endif
ifneq (,$(filter netstats_%, $(USEMODULE)))
USEMODULE += netstats
endif
ifneq (,$(filter gnrc_lwmac,$(USEMODULE)))
USEMODULE += gnrc_netif
USEMODULE += gnrc_mac
FEATURES_REQUIRED += periph_rtt
endif
ifneq (,$(filter pthread,$(USEMODULE)))
USEMODULE += xtimer
USEMODULE += timex
endif
ifneq (,$(filter schedstatistics,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter arduino,$(USEMODULE)))
FEATURES_REQUIRED += arduino
FEATURES_REQUIRED += periph_adc
FEATURES_REQUIRED += periph_gpio
USEMODULE += xtimer
endif
ifneq (,$(filter xtimer,$(USEMODULE)))
FEATURES_REQUIRED += periph_timer
USEMODULE += div
endif
ifneq (,$(filter saul,$(USEMODULE)))
USEMODULE += phydat
endif
ifneq (,$(filter saul_reg,$(USEMODULE)))
USEMODULE += saul
endif
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul
USEMODULE += saul_reg
USEMODULE += auto_init_saul
endif
ifneq (,$(filter saul_adc,$(USEMODULE)))
FEATURES_REQUIRED += periph_adc
endif
ifneq (,$(filter saul_gpio,$(USEMODULE)))
FEATURES_REQUIRED += periph_gpio
endif
ifneq (,$(filter saul,$(USEMODULE)))
USEMODULE += phydat
endif
ifneq (,$(filter saul_nrf_temperature,$(USEMODULE)))
FEATURES_REQUIRED += periph_temperature
endif
ifneq (,$(filter phydat,$(USEMODULE)))
USEMODULE += fmt
endif
ifneq (,$(filter evtimer,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter can_linux,$(USEMODULE)))
LINKFLAGS += -lsocketcan
endif
ifneq (,$(filter can,$(USEMODULE)))
USEMODULE += can_raw
USEMODULE += auto_init_can
ifneq (,$(filter can_mbox,$(USEMODULE)))
USEMODULE += core_mbox
endif
USEMODULE += gnrc_pktbuf_static
endif
ifneq (,$(filter can_isotp,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter conn_can,$(USEMODULE)))
USEMODULE += can
USEMODULE += can_mbox
USEMODULE += xtimer
endif
ifneq (,$(filter puf_sram,$(USEMODULE)))
USEMODULE += hashes
USEMODULE += random
FEATURES_REQUIRED += puf_sram
endif
ifneq (,$(filter random,$(USEMODULE)))
USEMODULE += prng
# select default prng
ifeq (,$(filter prng_%,$(USEMODULE)))
USEMODULE += prng_tinymt32
endif
ifneq (,$(filter prng_fortuna,$(USEMODULE)))
USEMODULE += fortuna
USEMODULE += hashes
USEMODULE += crypto
USEMODULE += xtimer
endif
ifneq (,$(filter prng_tinymt32,$(USEMODULE)))
USEMODULE += tinymt32
endif
ifneq (,$(filter prng_sha1prng,$(USEMODULE)))
USEMODULE += hashes
endif
ifeq (,$(filter puf_sram,$(USEMODULE)))
FEATURES_OPTIONAL += periph_hwrng
endif
USEMODULE += luid
endif
ifneq (,$(filter asymcute,$(USEMODULE)))
USEMODULE += sock_udp
USEMODULE += sock_util
USEMODULE += random
USEMODULE += event_timeout
USEMODULE += event_callback
endif
ifneq (,$(filter emcute,$(USEMODULE)))
USEMODULE += core_thread_flags
USEMODULE += sock_udp
USEMODULE += xtimer
endif
ifneq (,$(filter constfs,$(USEMODULE)))
USEMODULE += vfs
endif
ifneq (,$(filter devfs,$(USEMODULE)))
USEMODULE += vfs
endif
ifneq (,$(filter vfs,$(USEMODULE)))
USEMODULE += posix_headers
ifeq (native, $(BOARD))
USEMODULE += native_vfs
endif
endif
ifneq (,$(filter sock_dns,$(USEMODULE)))
USEMODULE += sock_util
USEMODULE += posix_headers
endif
ifneq (,$(filter sock_util,$(USEMODULE)))
USEMODULE += posix_inet
USEMODULE += fmt
USEMODULE += sock_udp
endif
ifneq (,$(filter event_%,$(USEMODULE)))
USEMODULE += event
endif
ifneq (,$(filter event_timeout,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter event,$(USEMODULE)))
USEMODULE += core_thread_flags
endif
ifneq (,$(filter spiffs,$(USEMODULE)))
USEPKG += spiffs
USEMODULE += vfs
USEMODULE += spiffs_fs
USEMODULE += mtd
endif
ifneq (,$(filter littlefs,$(USEMODULE)))
USEPKG += littlefs
USEMODULE += vfs
USEMODULE += littlefs_fs
USEMODULE += mtd
endif
ifneq (,$(filter l2filter_%,$(USEMODULE)))
USEMODULE += l2filter
endif
ifneq (,$(filter gcoap,$(USEMODULE)))
USEMODULE += nanocoap
USEMODULE += gnrc_sock_udp
USEMODULE += sock_util
endif
ifneq (,$(filter luid,$(USEMODULE)))
FEATURES_OPTIONAL += periph_cpuid
endif
ifneq (,$(filter nanocoap_%,$(USEMODULE)))
USEMODULE += nanocoap
endif
ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
USEPKG += fatfs
USEMODULE += vfs
endif
ifneq (,$(filter benchmark,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter skald_%,$(USEMODULE)))
USEMODULE += skald
endif
ifneq (,$(filter skald,$(USEMODULE)))
FEATURES_REQUIRED += radio_ble
USEMODULE += xtimer
USEMODULE += random
endif
ifneq (,$(filter bluetil_addr,$(USEMODULE)))
USEMODULE += fmt
endif
ifneq (,$(filter cord_epsim,$(USEMODULE)))
USEMODULE += cord_common
USEMODULE += gcoap
endif
ifneq (,$(filter cord_ep_standalone,$(USEMODULE)))
USEMODULE += cord_ep
USEMODULE += xtimer
endif
ifneq (,$(filter cord_ep,$(USEMODULE)))
USEMODULE += cord_common
USEMODULE += core_thread_flags
USEMODULE += gcoap
ifneq (,$(filter shell_commands,$(USEMODULE)))
USEMODULE += sock_util
endif
endif
ifneq (,$(filter cord_common,$(USEMODULE)))
USEMODULE += fmt
USEMODULE += luid
endif
ifneq (,$(filter tlsf-malloc,$(USEMODULE)))
USEPKG += tlsf
endif
ifneq (,$(filter uuid,$(USEMODULE)))
USEMODULE += hashes
USEMODULE += random
USEMODULE += fmt
endif
ifneq (,$(filter riotboot_flashwrite, $(USEMODULE)))
USEMODULE += riotboot_slot
FEATURES_REQUIRED += periph_flashpage
endif
ifneq (,$(filter riotboot_slot, $(USEMODULE)))
USEMODULE += riotboot_hdr
endif
ifneq (,$(filter riotboot_hdr, $(USEMODULE)))
USEMODULE += checksum
USEMODULE += riotboot
endif
# Enable periph_gpio when periph_gpio_irq is enabled
ifneq (,$(filter periph_gpio_irq,$(USEMODULE)))
FEATURES_REQUIRED += periph_gpio
endif
# always select gpio (until explicit dependencies are sorted out)
FEATURES_OPTIONAL += periph_gpio
# always select power management if available
FEATURES_OPTIONAL += periph_pm
# include package dependencies
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep)
# remove required features from optional features
FEATURES_OPTIONAL := $(filter-out $(FEATURES_REQUIRED),$(FEATURES_OPTIONAL))
# add all optional but provided features to the list of used features
FEATURES_USED := $(sort $(FEATURES_REQUIRED) $(filter $(FEATURES_OPTIONAL),$(FEATURES_PROVIDED)))
# all periph features correspond to a periph submodule
USEMODULE += $(filter periph_%,$(FEATURES_USED))
# select cpu_check_address pseudomodule if the corresponding feature is used
USEMODULE += $(filter cpu_check_address, $(FEATURES_USED))
# include periph_common if any periph_* driver is used
ifneq (,$(filter periph_%, $(USEMODULE)))
USEMODULE += periph_common
endif
# recursively catch transitive dependencies
USEMODULE := $(sort $(USEMODULE))
USEPKG := $(sort $(USEPKG))
ifneq ($(OLD_USEMODULE) $(OLD_USEPKG),$(USEMODULE) $(USEPKG))
include $(RIOTBASE)/Makefile.dep
endif
ifneq (,$(filter ecc_%,$(USEMODULE)))
USEMODULE += ecc
endif