From 33b72604f399d71a472c80bffffdc54714ecd153 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Sep 2020 21:17:16 +0200 Subject: [PATCH] windows build working --- Makefile-Hosted | 3 +-- hosted/main.cpp | 15 +++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile-Hosted b/Makefile-Hosted index 325eae90..b1568fd3 100644 --- a/Makefile-Hosted +++ b/Makefile-Hosted @@ -183,7 +183,6 @@ ifeq ($(DETECTED_OS), LINUX) CXXSRC += $(FRAMEWORK_PATH)/osal/linux/TcUnixUdpPollingTask.cpp CXXSRC += $(FRAMEWORK_PATH)/osal/linux/TmTcUnixUdpBridge.cpp endif -# CXXSRC += Service17Test.cpp # All C Sources included by .mk files are assigned here # Add the objects to sources so dependency handling works @@ -255,7 +254,7 @@ CXXDEFINES := $(CUSTOM_DEFINES) CFLAGS += CXXFLAGS += -I. $(DEBUG_LEVEL) $(WARNIING_FLAGS) $(I_INCLUDES) $(DEPFLAGS) \ -fmessage-length=0 $(CXXDEFINES) $(OPTIMIZATION) -CPPFLAGS += -std=c++17 -fno-exceptions +CPPFLAGS += -std=c++2a -fno-exceptions ASFLAGS = -Wall -g $(OPTIMIZATION) $(I_INCLUDES) -D__ASSEMBLY__ # Flags for the linker call diff --git a/hosted/main.cpp b/hosted/main.cpp index 051ea5bf..77c5145e 100644 --- a/hosted/main.cpp +++ b/hosted/main.cpp @@ -2,12 +2,15 @@ #include #include -#include #include -#include - - +#ifdef WIN32 +static const char* COMPILE_PRINTOUT = "Windows"; +#elif LINUX +static const char* COMPILE_PRINTOUT = "Linux"; +#else +static const char* COMPILE_PRINTOUT = "unknown OS"; +#endif /** * @brief This is the main program for the hosted build. It can be run for * Linux and Windows. @@ -16,13 +19,13 @@ int main(void) { std::cout << "-- EIVE OBSW --" << std::endl; - std::cout << "-- Compiled for Linux " << " --" << std::endl; + std::cout << "-- Compiled for " << COMPILE_PRINTOUT << " --" << std::endl; std::cout << "-- Software version v" << SW_VERSION << "." << SW_SUBVERSION << " -- " << std::endl; std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; InitMission::initMission(); - std::cout << std::endl; + for(;;) { // suspend main thread by sleeping it. TaskFactory::delayTask(5000);