-# Copyright(c) 2017 Intel Corporation
-
-driver_classes = ['bus', 'crypto', 'event', 'mempool', 'net']
-
-foreach class:driver_classes
+# Copyright(c) 2017-2019 Intel Corporation
+
+if is_windows
+ subdir_done()
+endif
+
+# 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
+if cc.has_argument('-Wno-format-truncation')
+ default_cflags += '-Wno-format-truncation'
+endif
+
+foreach class:dpdk_driver_classes