Implement feature selection in bmcweb

This patchsets implements feature selection in BMCWEB using compile
time macros.  This allows certain features, security implementations,
and other things to be selected at compile time.

Change-Id: Ic14343d36d82830e6cf51311ca886a90749ae6a7
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 93b3aa6..6454ed3 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -1,9 +1,11 @@
 #include <systemd/sd-daemon.h>
+#include <bmcweb/settings.hpp>
 #include <dbus_monitor.hpp>
 #include <dbus_singleton.hpp>
 #include <image_upload.hpp>
 #include <openbmc_dbus_rest.hpp>
 #include <persistent_data_middleware.hpp>
+#include <redfish.hpp>
 #include <redfish_v1.hpp>
 #include <sdbusplus/asio/connection.hpp>
 #include <sdbusplus/bus.hpp>
@@ -13,10 +15,9 @@
 #include <token_authorization_middleware.hpp>
 #include <web_kvm.hpp>
 #include <webassets.hpp>
+#include <webserver_common.hpp>
 #include <memory>
 #include <string>
-#include "redfish.hpp"
-#include "webserver_common.hpp"
 #include <crow/app.h>
 #include <boost/asio.hpp>
 
@@ -61,14 +62,26 @@
 #endif
   // Static assets need to be initialized before Authorization, because auth
   // needs to build the whitelist from the static routes
-  crow::webassets::request_routes(app);
-  crow::TokenAuthorization::request_routes(app);
 
+#ifdef BMCWEB_ENABLE_PHOSPHOR_WEBUI
+  crow::webassets::request_routes(app);
+#endif
+
+#ifdef BMCWEB_ENABLE_KVM
   crow::kvm::request_routes(app);
+#endif
+
+#ifdef BMCWEB_ENABLE_REDFISH
   crow::redfish::request_routes(app);
+#endif
+
+#ifdef BMCWEB_ENABLE_DBUS_REST
   crow::dbus_monitor::request_routes(app);
   crow::image_upload::requestRoutes(app);
   crow::openbmc_mapper::request_routes(app);
+#endif
+
+  crow::TokenAuthorization::request_routes(app);
 
   CROW_LOG_INFO << "bmcweb (" << __DATE__ << ": " << __TIME__ << ')';
   setup_socket(app);