commit f78f66cf9a04352f695e7b3d8f406d55eab3d21e Author: hkc Date: Sun Jan 30 23:04:56 2022 +0300 Ah shit, here we go again diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a591626 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +asciify +obj/*.o diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c962b6b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "thirdparty/stb"] + path = thirdparty/stb + url = https://github.com/nothings/stb/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7f728ef --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +CFLAGS := -Wall -Wextra -Werror -pedantic -std=c99 +CLIBS := -lm +INCLUDES := -Isrc +OBJECTS := obj/stb_image.o + +all: lib asciify + +lib: $(OBJECTS) + +clean: + $(RM) obj/* + +asciify: lib + $(CC) $(CFLAGS) src/main.c $(INCLUDES) $(OBJECTS) $(CLIBS) -o ./asciify + +obj/%.o: src/%.c + $(CC) $(CFLAGS) $^ $(INCLUDES) -c -o $@ + diff --git a/obj/.gitkeep b/obj/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..8cb8cce --- /dev/null +++ b/src/main.c @@ -0,0 +1,11 @@ +#include +#include +#include + +int main(int argc, char **argv) +{ + (void)argc; + (void)argv; + printf("ah shit, here we go again\n"); + return 0; +} diff --git a/src/stb_image.c b/src/stb_image.c new file mode 100644 index 0000000..9779bf8 --- /dev/null +++ b/src/stb_image.c @@ -0,0 +1,2 @@ +#define STB_IMAGE_IMPLEMENTATION +#include "./stb_image.h" diff --git a/src/stb_image.h b/src/stb_image.h new file mode 100644 index 0000000..b94f0ab --- /dev/null +++ b/src/stb_image.h @@ -0,0 +1,2 @@ +#include "../thirdparty/stb/stb_image.h" + diff --git a/thirdparty/stb b/thirdparty/stb new file mode 160000 index 0000000..af1a5bc --- /dev/null +++ b/thirdparty/stb @@ -0,0 +1 @@ +Subproject commit af1a5bc352164740c1cc1354942b1c6b72eacb8a