fix: finished stand argument parsing
This commit is contained in:
2
Makefile
2
Makefile
@@ -20,7 +20,7 @@ build:
|
|||||||
mkdir -p c-out/obj
|
mkdir -p c-out/obj
|
||||||
|
|
||||||
c-out/obj/%.o: yait/%.c
|
c-out/obj/%.o: yait/%.c
|
||||||
$(CC) $(CFLAGS) -DCOMMIT=$(shell git rev-list --count --all) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(YAIT): $(YAIT_OBJS)
|
$(YAIT): $(YAIT_OBJS)
|
||||||
$(CC) $(CFLAGS) -DCOMMIT=$(shell git rev-list --count --all) $^ -o $@
|
$(CC) $(CFLAGS) -DCOMMIT=$(shell git rev-list --count --all) $^ -o $@
|
||||||
|
|||||||
5
config.h
5
config.h
@@ -2,10 +2,9 @@
|
|||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define PROGRAM "yait"
|
#define PROGRAM "yait"
|
||||||
|
#define LICENSE_LINE "License BSD-3-Clause: BSD-3-Clause <https://opensource.org/license/bsd-3-clause>"
|
||||||
|
#define AUTHOR "vx_clutch"
|
||||||
#define VERSION "pre-alpha"
|
#define VERSION "pre-alpha"
|
||||||
#define YEAR 2025
|
#define YEAR 2025
|
||||||
|
|
||||||
#define LICENCE_LINE "License BSD-3-Clause: BSD-3-Clause <https://opensource.org/licenses/BSD-3-Clause>"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ int parse_standard_options(void (*usage)(), int argc, char **argv) {
|
|||||||
usage();
|
usage();
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (strcmp(argv[i], "--version") == 0) {
|
} else if (strcmp(argv[i], "--version") == 0) {
|
||||||
printf("%s %s %d\n", PROGRAM, VERSION, COMMIT);
|
printf("%s %s %d\nCopyright (C) %d %s.\n%s\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRNTY, to the extent permitted by law.\n", PROGRAM, VERSION, COMMIT, YEAR, AUTHOR, LICENSE_LINE);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user