aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-04-07 01:28:45 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-04-07 01:28:45 +0300
commit170f3ddc3d8967c0b5d4755c0221c396db215b2f (patch)
tree00314209cd7878b9d5b3fe6fc2e0c7297f76dec8 /src/main.c
parent2bdf1f8b1856bca8091d66a7a447e6c90993c297 (diff)
downloadek-170f3ddc3d8967c0b5d4755c0221c396db215b2f.tar.gz
ek-170f3ddc3d8967c0b5d4755c0221c396db215b2f.zip
implement some initial qbt backend stuff
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/main.c b/src/main.c
index 142a575..b3e2b2b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,13 +22,11 @@
* some way to make flag handling more generic
*/
static const char *cmdline_usage =
- "ek compiler usage:\n"
+ "ek frontend usage:\n"
" ek [-I <dir>...] [-o <outfile>] infile\n"
" -h Show usage (this)\n"
" -I <dir> Add directory to import path\n"
" infile Top file(s) to compile\n"
- " -o <outfile> Name of output assembly file\n"
- " (infile minus file extension if not given)\n"
;
/** Print usage of compiler. */
@@ -50,13 +48,8 @@ static void usage()
int main(int argc, char *argv[])
{
int opt;
- const char *output = "e.t";
- while ((opt = getopt(argc, argv, "hI:o:")) != -1) {
+ while ((opt = getopt(argc, argv, "hI:")) != -1) {
switch (opt) {
- case 'o':
- output = optarg;
- break;
-
case 'I':
add_import_path(optarg);
break;
@@ -84,5 +77,5 @@ int main(int argc, char *argv[])
}
const char *input = argv[optind];
- return compile(input, output);
+ return compile(input);
}