fix warning
This commit is contained in:
9
.gitmodules
vendored
Normal file
9
.gitmodules
vendored
Normal 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
|
||||||
11
Makefile
11
Makefile
@@ -1,4 +1,4 @@
|
|||||||
prefix = /usr/bin
|
PREFIX = /usr/bin
|
||||||
|
|
||||||
YAIT_SRCS := $(wildcard src/*.c)
|
YAIT_SRCS := $(wildcard src/*.c)
|
||||||
YAIT_OBJS := $(patsubst src/%.c,build/obj/%.o,$(YAIT_SRCS))
|
YAIT_OBJS := $(patsubst src/%.c,build/obj/%.o,$(YAIT_SRCS))
|
||||||
@@ -27,13 +27,12 @@ $(YAIT): $(YAIT_OBJS)
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install:
|
install: $(YAIT)
|
||||||
@echo "NOT IMPL"
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||||
exit 1
|
cp $(YAIT) $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@echo "NOT IMPL"
|
$(RM) $(DESTDIR)$(PREFIX)/bin/yait
|
||||||
exit 1
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -rf bin
|
$(RM) -rf bin
|
||||||
|
|||||||
2
config.h
2
config.h
@@ -6,7 +6,7 @@
|
|||||||
#define LICENSE_LINE \
|
#define LICENSE_LINE \
|
||||||
"License BSD-3-Clause: BSD-3-Clause <https://opensource.org/license/bsd-3-clause>"
|
"License BSD-3-Clause: BSD-3-Clause <https://opensource.org/license/bsd-3-clause>"
|
||||||
#define AUTHORS "vx_clutch"
|
#define AUTHORS "vx_clutch"
|
||||||
#define VERSION "alpha"
|
#define VERSION "1"
|
||||||
#define YEAR 2025
|
#define YEAR 2025
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
8
configure
vendored
8
configure
vendored
@@ -7,8 +7,11 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
|
|||||||
To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
||||||
VAR=VALUE.
|
VAR=VALUE.
|
||||||
|
|
||||||
CC C compiler command [detected]
|
CC C compiler command [detected]
|
||||||
CFLAGS C compiler flags [-g, ...]
|
CFLAGS C compiler flags [-g, ...]
|
||||||
|
LDFLAGS C linker flags
|
||||||
|
|
||||||
|
--prefix=<path> Set the install path
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
@@ -32,6 +35,7 @@ printf "%s\n" "$CC"
|
|||||||
for arg ; do
|
for arg ; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
--help|h) usage ;;
|
--help|h) usage ;;
|
||||||
|
--prefix=*) prefix=${arg#*=} ;;
|
||||||
CFLAGS=*) CFLAGS=${arg#*=} ;;
|
CFLAGS=*) CFLAGS=${arg#*=} ;;
|
||||||
LDFLAGS=*) LDFLAGS=${arg#*=} ;;
|
LDFLAGS=*) LDFLAGS=${arg#*=} ;;
|
||||||
CC=*) CC=${arg#*=} ;;
|
CC=*) CC=${arg#*=} ;;
|
||||||
|
|||||||
@@ -113,5 +113,16 @@ int create_project(manifest_t manifest)
|
|||||||
abort();
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
19
src/main.c
19
src/main.c
@@ -84,7 +84,24 @@ static int parse_arguments(manifest_t *conf, int argc, char **argv)
|
|||||||
conf->licence = TOlicence(optarg);
|
conf->licence = TOlicence(optarg);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user