diff --git a/src/bin/Makefile b/src/bin/Makefile new file mode 100644 index 0000000..56d2e68 --- /dev/null +++ b/src/bin/Makefile @@ -0,0 +1,8 @@ +OBJS = main.c +CC = gcc +C_FLAGS = -w -pedantic +OBJ_NAME = main + +all: $(OBJS) + $(CC) $(OBJS) $(C_FLAGS) -o $(OBJ_NAME) + diff --git a/src/bin/main.c b/src/bin/main.c index 6f940c8..166106f 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -1,7 +1,19 @@ #include -int main() { - // Refer to the documentation - printf("FIXME: %s\n", "Translate zernit into C lang"); - return 1; -} \ No newline at end of file +// FIXME: Does not build on clang +// FIXME-QA: Outputs warnings + +int main(int argc, char ** argv[]) { + if(argc < 2) { + // FIXME: Add better help message + // FIXME: Source from po depending on language used + printf("%s\n", "Argument(s) required, use -h for display help"); + return 2; + } else if(strcmp(argv[1], "-h") == 0) { + printf("FIXME: %s\n", "Add optionsi"); + return 1; + } else { + printf("FATAL: %s\n", "Unexpected happend while processing arguments"); + return 256; + } +}