+# Defines the order in which the drivers are buit.
+dpdk_driver_classes = ['common',
+ 'bus',
+ 'mempool', # depends on common and bus.
+ 'raw', # depends on common and bus.
+ 'net', # depends on common, bus, mempool and raw.
+ 'crypto', # depends on common, bus and mempool (net in future).
+ 'compress', # depends on common, bus, mempool.
+ 'vdpa', # depends on common, bus and mempool.
+ 'event', # depends on common, bus, mempool and net.
+ 'baseband'] # depends on common and bus.
+
+disabled_drivers = get_option('disable_drivers').split(',')
+
+default_cflags = machine_args
+if cc.has_argument('-Wno-format-truncation')
+ default_cflags += '-Wno-format-truncation'
+endif
+
+foreach class:dpdk_driver_classes