From c4da47ceddc9852c9255ea34474c06c77518b856 Mon Sep 17 00:00:00 2001 From: eyck Date: Wed, 30 Dec 2020 07:29:52 +0000 Subject: [PATCH] integrate code generation into build process (first attempt) --- CMakeLists.txt | 3 +++ .../interp/{src-CORENAME.cpp.gtl => CORENAME.cpp.gtl} | 2 +- .../templates/interp/{incl-CORENAME.h.gtl => CORENAME.h.gtl} | 2 +- .../interp/{vm-vm_CORENAME.cpp.gtl => vm_CORENAME.cpp.gtl} | 0 incl/iss/arch/tgf_c.h | 2 +- src/iss/tgf_c.cpp | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) rename gen_input/templates/interp/{src-CORENAME.cpp.gtl => CORENAME.cpp.gtl} (98%) rename gen_input/templates/interp/{incl-CORENAME.h.gtl => CORENAME.h.gtl} (99%) rename gen_input/templates/interp/{vm-vm_CORENAME.cpp.gtl => vm_CORENAME.cpp.gtl} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cfaeb1..c4be168 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,9 @@ endif() # Define the library add_library(tgfs SHARED ${LIB_SOURCES}) +# list code gen dependencies +add_dependencies(tgfs TGF_C_src) + target_compile_options(tgfs PRIVATE -Wno-shift-count-overflow) target_include_directories(tgfs PUBLIC incl) target_link_libraries(tgfs PUBLIC softfloat scc-util) diff --git a/gen_input/templates/interp/src-CORENAME.cpp.gtl b/gen_input/templates/interp/CORENAME.cpp.gtl similarity index 98% rename from gen_input/templates/interp/src-CORENAME.cpp.gtl rename to gen_input/templates/interp/CORENAME.cpp.gtl index a257137..3e93c82 100644 --- a/gen_input/templates/interp/src-CORENAME.cpp.gtl +++ b/gen_input/templates/interp/CORENAME.cpp.gtl @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2017, 2018 MINRES Technologies GmbH + * Copyright (C) 2017 - 2020 MINRES Technologies GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/gen_input/templates/interp/incl-CORENAME.h.gtl b/gen_input/templates/interp/CORENAME.h.gtl similarity index 99% rename from gen_input/templates/interp/incl-CORENAME.h.gtl rename to gen_input/templates/interp/CORENAME.h.gtl index f31aba9..df96375 100644 --- a/gen_input/templates/interp/incl-CORENAME.h.gtl +++ b/gen_input/templates/interp/CORENAME.h.gtl @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2017, 2018 MINRES Technologies GmbH + * Copyright (C) 2017 - 2020 MINRES Technologies GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/gen_input/templates/interp/vm-vm_CORENAME.cpp.gtl b/gen_input/templates/interp/vm_CORENAME.cpp.gtl similarity index 100% rename from gen_input/templates/interp/vm-vm_CORENAME.cpp.gtl rename to gen_input/templates/interp/vm_CORENAME.cpp.gtl diff --git a/incl/iss/arch/tgf_c.h b/incl/iss/arch/tgf_c.h index 4424509..2c2fee7 100644 --- a/incl/iss/arch/tgf_c.h +++ b/incl/iss/arch/tgf_c.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2017, 2018 MINRES Technologies GmbH + * Copyright (C) 2017 - 2020 MINRES Technologies GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/iss/tgf_c.cpp b/src/iss/tgf_c.cpp index 9fb2382..a035dbe 100644 --- a/src/iss/tgf_c.cpp +++ b/src/iss/tgf_c.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2017, 2018 MINRES Technologies GmbH + * Copyright (C) 2017 - 2020 MINRES Technologies GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without