diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-20 10:22:10 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-20 10:22:10 +0200 |
| commit | 6e4dc53ed58dc0bb1d0cbfc69c400eade10f9d9b (patch) | |
| tree | 2d31a1749ba8c9e3a5301e43d27a0bb441a3c885 | |
| parent | 6b1a8aa54a333b1dfe10364467046035ca96d33a (diff) | |
MHR-4: win64: assume usage of mingw on windows (makefile)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | 64asm.rsrc | 4 | ||||
| -rw-r--r-- | 64x0-cc.rsrc | 4 | ||||
| -rw-r--r-- | Icons/app-logo.ico | bin | 0 -> 3638 bytes | |||
| -rw-r--r-- | Sources/coff2ae.cc | 2 | ||||
| -rw-r--r-- | Sources/elf2ae.cc | 19 | ||||
| -rw-r--r-- | Sources/ppc-cc.cc | 17 | ||||
| -rw-r--r-- | bpp.rsrc | 4 | ||||
| -rw-r--r-- | i64asm.rsrc | 4 | ||||
| -rw-r--r-- | link.rsrc | 4 | ||||
| -rw-r--r-- | posix.make | 20 | ||||
| -rw-r--r-- | ppc-cc.rsrc | 4 | ||||
| -rw-r--r-- | ppcasm.rsrc | 4 | ||||
| -rw-r--r-- | win64.make | 4 |
13 files changed, 60 insertions, 30 deletions
@@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END diff --git a/64x0-cc.rsrc b/64x0-cc.rsrc index de7d9fc..afa07df 100644 --- a/64x0-cc.rsrc +++ b/64x0-cc.rsrc @@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END diff --git a/Icons/app-logo.ico b/Icons/app-logo.ico Binary files differnew file mode 100644 index 0000000..9be8328 --- /dev/null +++ b/Icons/app-logo.ico diff --git a/Sources/coff2ae.cc b/Sources/coff2ae.cc index 1021fed..51f63c9 100644 --- a/Sources/coff2ae.cc +++ b/Sources/coff2ae.cc @@ -19,4 +19,4 @@ ///////////////////////////////////////////////////////////////////////////////////////// -MPCC_MODULE(NewOSCOFFToAE) { return 0; }
\ No newline at end of file +MPCC_MODULE(NewOSCOFFToAE) { return 0; } diff --git a/Sources/elf2ae.cc b/Sources/elf2ae.cc index ab9b265..77568dc 100644 --- a/Sources/elf2ae.cc +++ b/Sources/elf2ae.cc @@ -2,4 +2,21 @@ Copyright Mahrouss Logic -------------------------------------------- */
\ No newline at end of file +------------------------------------------- */ + +#include <Headers/ParserKit.hpp> +#include <Headers/StdKit/AE.hpp> +#include <Headers/StdKit/PEF.hpp> +#include <filesystem> +#include <fstream> +#include <iostream> +#include <memory> +#include <vector> + +///////////////////////////////////////////////////////////////////////////////////////// + +/// @brief COFF 2 AE entrypoint, the program/module starts here. + +///////////////////////////////////////////////////////////////////////////////////////// + +MPCC_MODULE(NewOSELFToAE) { return 0; } diff --git a/Sources/ppc-cc.cc b/Sources/ppc-cc.cc index bb38439..a410213 100644 --- a/Sources/ppc-cc.cc +++ b/Sources/ppc-cc.cc @@ -37,7 +37,7 @@ ///////////////////// -// ANSI ESCAPE CODES +/// ANSI ESCAPE CODES ///////////////////// @@ -47,7 +47,7 @@ ///////////////////////////////////// -// INTERNAL STUFF OF THE C COMPILER +/// INTERNAL STRUCT OF THE C COMPILER ///////////////////////////////////// @@ -61,16 +61,16 @@ struct CompilerRegisterMap final { // \brief Map for C structs // \author amlel struct CompilerStructMap final { - // 'my_foo' + /// 'struct::my_foo' std::string fName; - // if instance: stores a valid register. + /// if instance: stores a valid register. std::string fReg; - // offset count + /// offset count std::size_t fOffsetsCnt; - // offset array. + /// offset array. std::vector<std::pair<Int32, std::string>> fOffsets; }; @@ -95,9 +95,8 @@ namespace detail { void print_error(std::string reason, std::string file) noexcept { if (reason[0] == '\n') reason.erase(0, 1); - if (file.find(".pp") != std::string::npos) { + if (file.find(".pp") != std::string::npos) file.erase(file.find(".pp"), 3); - } if (kState.fLastFile != file) { std::cout << kRed << "[ cc ] " << kWhite @@ -395,7 +394,7 @@ bool CompilerBackendCLang::Compile(const std::string &text, const char *file) { if (textBuffer.find("typedef ") != std::string::npos) continue; if (textBuffer[text_index] == '=' && kInStruct) { - detail::print_error("assignement of value in struct " + textBuffer, + detail::print_error("assignement of value inside a struct " + textBuffer, file); continue; } @@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END diff --git a/i64asm.rsrc b/i64asm.rsrc index eefb73c..0a76070 100644 --- a/i64asm.rsrc +++ b/i64asm.rsrc @@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END @@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END @@ -10,35 +10,35 @@ COMMON_INC=-I./Headers -I./ -I./Sources/Detail LINK_CC=g++ -std=c++20 LINK_SRC=Sources/link.cc -LINK_OUTPUT=Output/link.exe -LINK_ALT_OUTPUT=Output/64link.exe -LINK_ALT_3_OUTPUT=Output/i64link.exe -LINK_ALT_2_OUTPUT=Output/32link.exe +LINK_OUTPUT=Output/link.exec +LINK_ALT_OUTPUT=Output/64link.exec +LINK_ALT_3_OUTPUT=Output/i64link.exec +LINK_ALT_2_OUTPUT=Output/32link.exec PP_SRC=Sources/bpp.cc -PP_OUTPUT=Output/bpp.exe +PP_OUTPUT=Output/bpp.exec SRC_COMMON=Sources/String.cc Sources/AsmKit.cc # C Compiler (PowerPC) 64X0_CC_SRC=Sources/64x0-cc.cc $(SRC_COMMON) -64X0_CC_OUTPUT=Output/64x0-cc.exe +64X0_CC_OUTPUT=Output/64x0-cc.exec # C Compiler (Our own RISC) PPC_CC_SRC=Sources/ppc-cc.cc $(SRC_COMMON) -PPC_CC_OUTPUT=Output/ppc-cc.exe +PPC_CC_OUTPUT=Output/ppc-cc.exec # 64x0 Assembler (Our Own RISC) ASM_SRC=Sources/64asm.cc $(SRC_COMMON) -ASM_OUTPUT=Output/64asm.exe +ASM_OUTPUT=Output/64asm.exec # AMD64 Assembler (Intel CISC) IASM_SRC=Sources/i64asm.cc $(SRC_COMMON) -IASM_OUTPUT=Output/i64asm.exe +IASM_OUTPUT=Output/i64asm.exec # Power4 Assembler (IBM RISC) PPCASM_SRC=Sources/ppcasm.cc $(SRC_COMMON) -PPCASM_OUTPUT=Output/ppcasm.exe +PPCASM_OUTPUT=Output/ppcasm.exec .PHONY: all all: pre-processor compiler linker diff --git a/ppc-cc.rsrc b/ppc-cc.rsrc index 171bd96..c33f961 100644 --- a/ppc-cc.rsrc +++ b/ppc-cc.rsrc @@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END diff --git a/ppcasm.rsrc b/ppcasm.rsrc index af422d8..cc1771b 100644 --- a/ppcasm.rsrc +++ b/ppcasm.rsrc @@ -1,5 +1,7 @@ #include "Headers/Version.hxx" +1 ICON "Icons/app-logo.ico" + 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 @@ -22,4 +24,4 @@ BEGIN BEGIN VALUE "Translation", 0x809, 1252 END -END
\ No newline at end of file +END @@ -8,8 +8,8 @@ # COMMON_INC=-I./Headers -I./ -I./Sources/Detail -LINK_CC=x86_64-w64-mingw32-g++.exe -std=c++20 -Xlinker -s -WINRES=x86_64-w64-mingw32-windres.exe +LINK_CC=x86_64-w64-mingw32-g++ -std=c++20 -Xlinker -s +WINRES=x86_64-w64-mingw32-windres LINK_SRC=Sources/link.cc LINK_OUTPUT=Output/link.exe LINK_ALT_OUTPUT=Output/64link.exe |
