+# Defines the order in which the drivers are buit.
+dpdk_driver_classes = ['common',
+ 'bus',
+ 'mempool', # depends on common and bus.
+ 'net', # depends on common, bus, mempool
+ 'raw', # depends on common, bus and net.
+ '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 = run_command(list_dir_globs, get_option('disable_drivers'),
+ ).stdout().split()
+
+default_cflags = machine_args
+default_cflags += ['-DALLOW_EXPERIMENTAL_API']
+default_cflags += ['-DALLOW_INTERNAL_API']
+
+if cc.has_argument('-Wno-format-truncation')
+ default_cflags += '-Wno-format-truncation'
+endif
+
+foreach class:dpdk_driver_classes