fix warning

This commit is contained in:
2025-08-23 15:12:21 -04:00
parent b62d6b1a61
commit a2bc8dd002
6 changed files with 50 additions and 10 deletions

9
.gitmodules vendored Normal file
View File

@@ -0,0 +1,9 @@
[submodule "foo/ncurses"]
path = foo/ncurses
url = https://github.com/mirror/ncurses
[submodule "dd/ncurses"]
path = dd/ncurses
url = https://github.com/mirror/ncurses
[submodule "dd/uthash"]
path = dd/uthash
url = https://github.com/troydhanson/uthash

View File

@@ -1,4 +1,4 @@
prefix = /usr/bin
PREFIX = /usr/bin
YAIT_SRCS := $(wildcard src/*.c)
YAIT_OBJS := $(patsubst src/%.c,build/obj/%.o,$(YAIT_SRCS))
@@ -27,13 +27,12 @@ $(YAIT): $(YAIT_OBJS)
endif
install:
@echo "NOT IMPL"
exit 1
install: $(YAIT)
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp $(YAIT) $(DESTDIR)$(PREFIX)/bin/
uninstall:
@echo "NOT IMPL"
exit 1
$(RM) $(DESTDIR)$(PREFIX)/bin/yait
clean:
$(RM) -rf bin

View File

@@ -6,7 +6,7 @@
#define LICENSE_LINE \
"License BSD-3-Clause: BSD-3-Clause <https://opensource.org/license/bsd-3-clause>"
#define AUTHORS "vx_clutch"
#define VERSION "alpha"
#define VERSION "1"
#define YEAR 2025
#endif

8
configure vendored
View File

@@ -7,8 +7,11 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.
CC C compiler command [detected]
CFLAGS C compiler flags [-g, ...]
CC C compiler command [detected]
CFLAGS C compiler flags [-g, ...]
LDFLAGS C linker flags
--prefix=<path> Set the install path
EOF
exit 0
@@ -32,6 +35,7 @@ printf "%s\n" "$CC"
for arg ; do
case "$arg" in
--help|h) usage ;;
--prefix=*) prefix=${arg#*=} ;;
CFLAGS=*) CFLAGS=${arg#*=} ;;
LDFLAGS=*) LDFLAGS=${arg#*=} ;;
CC=*) CC=${arg#*=} ;;

View File

@@ -113,5 +113,16 @@ int create_project(manifest_t manifest)
abort();
}
if (manifest.libraries.ncurses)
system("git submodule add --quiet https://github.com/mirror/ncurses");
if (manifest.libraries.raylib)
system("git submodule add --quiet https://github.com/raysan5/raylib");
if (manifest.libraries.stb)
system("git submodule add --quiet https://github.com/nothings/stb");
if (manifest.libraries.uthash)
system("git submodule add --quiet https://github.com/troydhanson/uthash");
if (manifest.libraries.linenoise)
system("git submodule add --quiet https://github.com/antirez/linenoise");
return 0;
}

View File

@@ -84,7 +84,24 @@ static int parse_arguments(manifest_t *conf, int argc, char **argv)
conf->licence = TOlicence(optarg);
break;
case 'l':
#warning "Implement -l <lib>"
if (strcmp(optarg, "list") == 0) {
puts("ncurses\nraylib\nstb\nuthash\nlinenoise");
exit(EXIT_SUCCESS);
}
if (strcmp(optarg, "ncurses") == 0)
conf->libraries.ncurses = true;
else if (strcmp(optarg, "raylib") == 0)
conf->libraries.raylib = true;
else if (strcmp(optarg, "stb") == 0)
conf->libraries.stb = true;
else if (strcmp(optarg, "uthash") == 0)
conf->libraries.uthash = true;
else if (strcmp(optarg, "linenoise") == 0)
conf->libraries.linenoise = true;
else
fprintf(stderr,
"warning: %s is not a support library",
optarg);
break;
default:
return 1;