diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c86ff3e --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +src/*.o +src/*/*.o +src/*/*/*.o +lite +*.txt diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..6cdca3a --- /dev/null +++ b/Makefile @@ -0,0 +1,103 @@ +# +# Makefile generated by: +# codebench 0.55 +# +# Project: lite +# +# Created on: 14-12-2021 20:40:46 +# +# + +################################################################### +## +##//// Objects +## +################################################################### + +lite_OBJ := \ + src/lib/stb/stb_truetype.o src/api/renderer.o src/api/renderer_font.o \ + src/api/system.o src/main.o src/api/api.o \ + src/rencache.o src/renderer.o + + +################################################################### +## +##//// Variables and Environment +## +################################################################### + +CC := gcc:bin/gcc + +INCPATH := -I. + +CFLAGS := $(INCPATH) -D__USE_INLINE__ -Wall -Werror -Wwrite-strings -Isrc + + +################################################################### +## +##//// General rules +## +################################################################### + +.PHONY: all all-before all-after clean clean-custom realclean + +all: all-before lite all-after + +all-before: +# You can add rules here to execute before the project is built + +all-after: +# You can add rules here to execute after the project is built + +clean: clean-custom + @echo "Cleaning compiler objects..." + @rm -f $(lite_OBJ) + +realclean: + @echo "Cleaning compiler objects and targets..." + @rm -f $(lite_OBJ) lite + + +################################################################### +## +##//// Targets +## +################################################################### + +lite: $(lite_OBJ) + @echo "Linking lite" + @gcc:bin/gcc -o lite $(lite_OBJ) -llua -lSDL2 -lfreetype -lpthread -lauto + @echo "Removing stale debug target: lite" + @rm -f lite.debug + + +################################################################### +## +##//// Standard rules +## +################################################################### + +# A default rule to make all the objects listed below +# because we are hiding compiler commands from the output + +.c.o: + @echo "Compiling $<" + @$(CC) -c $< -o $*.o $(CFLAGS) + +src/api/api.o: src/api/api.c + +src/api/renderer.o: src/api/renderer.c + +src/api/renderer_font.o: src/api/renderer_font.c + +src/api/system.o: src/api/system.c + +src/main.o: src/main.c src/api/api.h src/renderer.h \ + + +src/rencache.o: src/rencache.c src/rencache.h + +src/renderer.o: src/renderer.c src/lib/stb/stb_truetype.h + +src/lib/stb/stb_truetype.o: src/lib/stb/stb_truetype.c + diff --git a/lite.cbp b/lite.cbp new file mode 100755 index 0000000..2c175e5 --- /dev/null +++ b/lite.cbp @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lite.cbp.info b/lite.cbp.info new file mode 100644 index 0000000..7f560dc Binary files /dev/null and b/lite.cbp.info differ diff --git a/lite.info b/lite.info new file mode 100644 index 0000000..21b2fb3 Binary files /dev/null and b/lite.info differ diff --git a/src/api/api.h b/src/api/api.h index b6813e5..dc2225f 100644 --- a/src/api/api.h +++ b/src/api/api.h @@ -1,9 +1,15 @@ #ifndef API_H #define API_H +#if __amigaos4__ +#include "lua.h" +#include "lauxlib.h" +#include "lualib.h" +#else #include "lib/lua52/lua.h" #include "lib/lua52/lauxlib.h" #include "lib/lua52/lualib.h" +#endif #define API_TYPE_FONT "Font" diff --git a/src/main.c b/src/main.c index 1c6872f..27d775f 100644 --- a/src/main.c +++ b/src/main.c @@ -38,6 +38,9 @@ static void get_exe_filename(char *buf, int sz) { #elif __APPLE__ unsigned size = sz; _NSGetExecutablePath(buf, &size); +#elif __amigaos4__ + // TODO: Temporary. Needs to be done properly + strcpy(buf, "Applications:Programming/workspace/MyProjects/lite/lite"); #else strcpy(buf, "./lite"); #endif