From 5df2481feedc84331a20edbc4312599510a66241 Mon Sep 17 00:00:00 2001 From: nemeth_mihaly Date: Thu, 15 Dec 2022 15:03:34 +0100 Subject: [PATCH] initial commit --- Build.bat | 28 ++++++++++++++++++++++++++++ Run.bat | 10 ++++++++++ Source/Core/ScalarDataTypes.hpp | 24 ++++++++++++++++++++++++ Source/Main.cpp | 5 +++++ 4 files changed, 67 insertions(+) create mode 100644 Build.bat create mode 100644 Run.bat create mode 100644 Source/Core/ScalarDataTypes.hpp create mode 100644 Source/Main.cpp diff --git a/Build.bat b/Build.bat new file mode 100644 index 0000000..00dba8c --- /dev/null +++ b/Build.bat @@ -0,0 +1,28 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET target_name=Test.exe + +SET target_dir=Target\ + +SET compiler=g++ +SET compiler_flags=-ggdb -Wall -Wextra + +SET linker_flags=-L. + +IF NOT EXIST %target_dir% ( + MKDIR %target_dir% +) + +FOR /R %%F IN (*.cpp) DO ( + %compiler% -c -I. %%F -o %target_dir%\%%~NF.o +) + +SET obj_array= +FOR /R %%F IN (*.o) DO ( + SET obj_array=!obj_array! %%F +) + +%compiler% %obj_array% -o %target_dir%\%target_name% %linker_flags% + +DEL %target_dir%\*.o \ No newline at end of file diff --git a/Run.bat b/Run.bat new file mode 100644 index 0000000..6a375a1 --- /dev/null +++ b/Run.bat @@ -0,0 +1,10 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET target_name=Test.exe + +SET target_dir=Target\ + +CALL Build.bat + +%target_dir%\%target_name% \ No newline at end of file diff --git a/Source/Core/ScalarDataTypes.hpp b/Source/Core/ScalarDataTypes.hpp new file mode 100644 index 0000000..5bc9edc --- /dev/null +++ b/Source/Core/ScalarDataTypes.hpp @@ -0,0 +1,24 @@ +#pragma once + +/** + * Integer Types + * **/ +typedef signed char i8; +typedef signed short i16; +typedef signed int i32; +typedef signed long long i64; + +typedef i64 isize; + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; + +typedef u64 usize; + +/** + * Floating-Point Types + * **/ +typedef float f32; +typedef double f64; \ No newline at end of file diff --git a/Source/Main.cpp b/Source/Main.cpp new file mode 100644 index 0000000..91f38f2 --- /dev/null +++ b/Source/Main.cpp @@ -0,0 +1,5 @@ +#include + +i32 main() { + +} \ No newline at end of file