diff --git a/tools/gbagfx/.gitignore b/tools/gbagfx/.gitignore deleted file mode 100755 index dbbb3f04..00000000 --- a/tools/gbagfx/.gitignore +++ /dev/null @@ -1 +0,0 @@ -gbagfx diff --git a/tools/gbagfx/Makefile b/tools/gbagfx/Makefile deleted file mode 100755 index f0638414..00000000 --- a/tools/gbagfx/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -CC = gcc - -CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK - -LIBS = -lpng -lz - -SRCS = main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c - -.PHONY: all clean - -all: gbagfx - @: - -gbagfx-debug: $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h - $(CC) $(CFLAGS) -DDEBUG $(SRCS) -o $@ $(LDFLAGS) $(LIBS) - -gbagfx: $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h - $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS) - -clean: - $(RM) gbagfx gbagfx.exe diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 0b9b0cf3..74096d38 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -3,3 +3,4 @@ add_subdirectory(aif2pcm) add_subdirectory(asset_processor) add_subdirectory(bin2c) add_subdirectory(gbafix) +add_subdirectory(gbagfx) diff --git a/tools/src/gbagfx/CMakeLists.txt b/tools/src/gbagfx/CMakeLists.txt new file mode 100644 index 00000000..cc7f1402 --- /dev/null +++ b/tools/src/gbagfx/CMakeLists.txt @@ -0,0 +1,9 @@ +file(GLOB_RECURSE sources *.c) + +# TODO Makefile had a debug build with -DDEBUG +add_executable(gbagfx ${sources}) +target_include_directories(gbagfx PRIVATE .) +# TODO properly handle these dependencies +target_link_libraries(gbagfx PRIVATE png z) + +install(TARGETS gbagfx RUNTIME DESTINATION bin) diff --git a/tools/gbagfx/LICENSE b/tools/src/gbagfx/LICENSE similarity index 100% rename from tools/gbagfx/LICENSE rename to tools/src/gbagfx/LICENSE diff --git a/tools/gbagfx/convert_png.c b/tools/src/gbagfx/convert_png.c similarity index 100% rename from tools/gbagfx/convert_png.c rename to tools/src/gbagfx/convert_png.c diff --git a/tools/gbagfx/convert_png.h b/tools/src/gbagfx/convert_png.h similarity index 100% rename from tools/gbagfx/convert_png.h rename to tools/src/gbagfx/convert_png.h diff --git a/tools/gbagfx/font.c b/tools/src/gbagfx/font.c similarity index 100% rename from tools/gbagfx/font.c rename to tools/src/gbagfx/font.c diff --git a/tools/gbagfx/font.h b/tools/src/gbagfx/font.h similarity index 100% rename from tools/gbagfx/font.h rename to tools/src/gbagfx/font.h diff --git a/tools/gbagfx/gfx.c b/tools/src/gbagfx/gfx.c similarity index 100% rename from tools/gbagfx/gfx.c rename to tools/src/gbagfx/gfx.c diff --git a/tools/gbagfx/gfx.h b/tools/src/gbagfx/gfx.h similarity index 100% rename from tools/gbagfx/gfx.h rename to tools/src/gbagfx/gfx.h diff --git a/tools/gbagfx/global.h b/tools/src/gbagfx/global.h similarity index 100% rename from tools/gbagfx/global.h rename to tools/src/gbagfx/global.h diff --git a/tools/gbagfx/huff.c b/tools/src/gbagfx/huff.c similarity index 100% rename from tools/gbagfx/huff.c rename to tools/src/gbagfx/huff.c diff --git a/tools/gbagfx/huff.h b/tools/src/gbagfx/huff.h similarity index 100% rename from tools/gbagfx/huff.h rename to tools/src/gbagfx/huff.h diff --git a/tools/gbagfx/jasc_pal.c b/tools/src/gbagfx/jasc_pal.c similarity index 100% rename from tools/gbagfx/jasc_pal.c rename to tools/src/gbagfx/jasc_pal.c diff --git a/tools/gbagfx/jasc_pal.h b/tools/src/gbagfx/jasc_pal.h similarity index 100% rename from tools/gbagfx/jasc_pal.h rename to tools/src/gbagfx/jasc_pal.h diff --git a/tools/gbagfx/link.pal b/tools/src/gbagfx/link.pal similarity index 100% rename from tools/gbagfx/link.pal rename to tools/src/gbagfx/link.pal diff --git a/tools/gbagfx/lz.c b/tools/src/gbagfx/lz.c similarity index 100% rename from tools/gbagfx/lz.c rename to tools/src/gbagfx/lz.c diff --git a/tools/gbagfx/lz.h b/tools/src/gbagfx/lz.h similarity index 100% rename from tools/gbagfx/lz.h rename to tools/src/gbagfx/lz.h diff --git a/tools/gbagfx/main.c b/tools/src/gbagfx/main.c similarity index 100% rename from tools/gbagfx/main.c rename to tools/src/gbagfx/main.c diff --git a/tools/gbagfx/options.h b/tools/src/gbagfx/options.h similarity index 100% rename from tools/gbagfx/options.h rename to tools/src/gbagfx/options.h diff --git a/tools/gbagfx/rl.c b/tools/src/gbagfx/rl.c similarity index 100% rename from tools/gbagfx/rl.c rename to tools/src/gbagfx/rl.c diff --git a/tools/gbagfx/rl.h b/tools/src/gbagfx/rl.h similarity index 100% rename from tools/gbagfx/rl.h rename to tools/src/gbagfx/rl.h diff --git a/tools/gbagfx/util.c b/tools/src/gbagfx/util.c similarity index 100% rename from tools/gbagfx/util.c rename to tools/src/gbagfx/util.c diff --git a/tools/gbagfx/util.h b/tools/src/gbagfx/util.h similarity index 100% rename from tools/gbagfx/util.h rename to tools/src/gbagfx/util.h