summaryrefslogtreecommitdiffhomepage
path: root/CompilerFrontend/cl/main.d
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-09 21:47:33 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-09 21:47:33 +0100
commit9cef856478cebe4bfe00e1d39c9e2d49015dd0e4 (patch)
treef04c6b6b1156057748c7044a766120485c45c885 /CompilerFrontend/cl/main.d
parenta8a55bc93e06cd8f75f7d397c013f7a312ea29a4 (diff)
MP-UX/hCore Assembler for 64x0, Release I.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'CompilerFrontend/cl/main.d')
-rw-r--r--CompilerFrontend/cl/main.d112
1 files changed, 0 insertions, 112 deletions
diff --git a/CompilerFrontend/cl/main.d b/CompilerFrontend/cl/main.d
deleted file mode 100644
index aabc0ff..0000000
--- a/CompilerFrontend/cl/main.d
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * ========================================================
- *
- * MP-UX C Compiler
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-// @file main.d
-// @brief CLI of the X64000 C/C++ compiler
-
-module mpcc.main;
-
-import mpcc.compiler;
-import std.container.dlist;
-
-///Authors: Amlal EL Mahrouss
-///Examples: mpcc_summon_manual("foo");
-void mpcc_summon_manual(string path)
-{
- import core.stdc.stdlib;
- import std.string;
- import std.file;
-
- string base = "man ";
- base ~= "/usr/local/bin/man/";
-
- string extension = ".8";
-
- core.stdc.stdlib.system(toStringz(base ~ path ~ extension));
-}
-
-void main(string[] args)
-{
- import std.range, std.stdio;
-
- bool shared_library = false;
- bool compile_only = false;
- bool kernel_driver = false;
- string output_file = "a.out";
- size_t index = 0UL;
-
- string[255] args_list;
-
- foreach (arg ; args)
- {
- if (arg[0] == '-')
- {
- if (arg == "--version" ||
- arg == "-v")
- {
- writeln("mpcc: version 1.01, (c) Mahrouss Logic all rights reserved.");
- return;
- }
- else if (arg == "--dialect")
- {
- mpcc_summon_executable("/usr/local/bin/bin/cc --asm=masm --compiler=dolvik --dialect");
- return;
- }
- else if (arg == "--help" ||
- arg == "-h")
- {
- writeln("mpcc: summoning manual entry for mpcc...");
- mpcc_summon_manual("mpcc");
-
- return;
- }
- else if (arg == "-c")
- {
- compile_only = true;
- continue;
- }
- else if (arg == "-kernel")
- {
- kernel_driver = true;
- continue;
- }
- else if (arg == "-shared")
- {
- output_file = "a.lib";
- shared_library = true;
- continue;
- }
-
- writeln("mpcc: unknown argument " ~ arg);
- return;
- }
-
- if (index == 0)
- {
- ++index;
- continue;
- }
-
- args_list[index] = arg;
- ++index;
- }
-
- if (args_list[1] == null)
- {
- writeln("mpcc: no input files.");
- return;
- }
-
- auto compiler = new CompileCommand();
-
- if (kernel_driver)
- compiler.compile(Platform.getKernelPath(), args_list, shared_library, output_file, compile_only);
- else
- compiler.compile(Platform.getIncludePath(), args_list, shared_library, output_file, compile_only);
-} \ No newline at end of file