diff --git a/src/emk.c b/src/emk.c new file mode 100644 index 0000000..ee224cb --- /dev/null +++ b/src/emk.c @@ -0,0 +1,42 @@ +#include +#include +#include + +#include "emk.h" + +static void +usage() +{ + printf("%s - simple build system and scripting language\n", argv[0]); + printf("usage: %s [-h] [-v]\n", argv[0]); + printf("\n"); + printf("%s {-h} Show this message\n", argv[0]); + printf("%s {-v} Show the current version\n", argv[0]); + printf("\n"); + printf("When no option is passed, %s run in the working directory.\n", argv[0]); + printf("\n"); + printf("Emk is free software.\n"); + printf("See the GNU GPL version 3 for details.\n"); +} + +int +main(int argc, char *argv[]) +{ + int opt; + + while ((opt = getopt(argv,argv, ":if:hv")) != -1) { + switch(opt) { + case 'h': + usage(); + break; + case 'v': + printf(EMK_VERSION "\n"); + break; + case '?': + printf("emkfile would be run here\n"); + break; + } + } + + return 0; +} diff --git a/src/emk.h b/src/emk.h index aecd1b9..861781a 100644 --- a/src/emk.h +++ b/src/emk.h @@ -20,6 +20,8 @@ #ifndef EMK_H_ #define EMK_H_ +#define EMK_VERSION "0.0.1-rc" + int checkForRoot(); char checkForFiles(); char readEmkFile();