diff --git a/tools/preproc/.gitignore b/tools/preproc/.gitignore deleted file mode 100755 index eb347087..00000000 --- a/tools/preproc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -preproc diff --git a/tools/preproc/Makefile b/tools/preproc/Makefile deleted file mode 100755 index 63dedda1..00000000 --- a/tools/preproc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -CXX := g++ - -CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror - -SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \ - utf8.cpp - -HEADERS := asm_file.h c_file.h char_util.h charmap.h preproc.h string_parser.h \ - utf8.h - -.PHONY: all clean - -all: preproc - @: - -preproc: $(SRCS) $(HEADERS) - $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS) - -clean: - $(RM) preproc preproc.exe diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 2f0f141f..5d77a206 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -5,3 +5,4 @@ add_subdirectory(bin2c) add_subdirectory(gbafix) add_subdirectory(gbagfx) add_subdirectory(mid2agb) +add_subdirectory(preproc) diff --git a/tools/src/preproc/CMakeLists.txt b/tools/src/preproc/CMakeLists.txt new file mode 100644 index 00000000..f2674fae --- /dev/null +++ b/tools/src/preproc/CMakeLists.txt @@ -0,0 +1,6 @@ +file(GLOB_RECURSE sources *.cpp) + +add_executable(preproc ${sources}) +target_include_directories(preproc PRIVATE .) + +install(TARGETS preproc RUNTIME DESTINATION bin) diff --git a/tools/preproc/LICENSE b/tools/src/preproc/LICENSE similarity index 100% rename from tools/preproc/LICENSE rename to tools/src/preproc/LICENSE diff --git a/tools/preproc/asm_file.cpp b/tools/src/preproc/asm_file.cpp similarity index 100% rename from tools/preproc/asm_file.cpp rename to tools/src/preproc/asm_file.cpp diff --git a/tools/preproc/asm_file.h b/tools/src/preproc/asm_file.h similarity index 100% rename from tools/preproc/asm_file.h rename to tools/src/preproc/asm_file.h diff --git a/tools/preproc/c_file.cpp b/tools/src/preproc/c_file.cpp similarity index 100% rename from tools/preproc/c_file.cpp rename to tools/src/preproc/c_file.cpp diff --git a/tools/preproc/c_file.h b/tools/src/preproc/c_file.h similarity index 100% rename from tools/preproc/c_file.h rename to tools/src/preproc/c_file.h diff --git a/tools/preproc/char_util.h b/tools/src/preproc/char_util.h similarity index 100% rename from tools/preproc/char_util.h rename to tools/src/preproc/char_util.h diff --git a/tools/preproc/charmap.cpp b/tools/src/preproc/charmap.cpp similarity index 100% rename from tools/preproc/charmap.cpp rename to tools/src/preproc/charmap.cpp diff --git a/tools/preproc/charmap.h b/tools/src/preproc/charmap.h similarity index 100% rename from tools/preproc/charmap.h rename to tools/src/preproc/charmap.h diff --git a/tools/preproc/preproc.cpp b/tools/src/preproc/preproc.cpp similarity index 100% rename from tools/preproc/preproc.cpp rename to tools/src/preproc/preproc.cpp diff --git a/tools/preproc/preproc.h b/tools/src/preproc/preproc.h similarity index 100% rename from tools/preproc/preproc.h rename to tools/src/preproc/preproc.h diff --git a/tools/preproc/string_parser.cpp b/tools/src/preproc/string_parser.cpp similarity index 100% rename from tools/preproc/string_parser.cpp rename to tools/src/preproc/string_parser.cpp diff --git a/tools/preproc/string_parser.h b/tools/src/preproc/string_parser.h similarity index 100% rename from tools/preproc/string_parser.h rename to tools/src/preproc/string_parser.h diff --git a/tools/preproc/utf8.cpp b/tools/src/preproc/utf8.cpp similarity index 100% rename from tools/preproc/utf8.cpp rename to tools/src/preproc/utf8.cpp diff --git a/tools/preproc/utf8.h b/tools/src/preproc/utf8.h similarity index 100% rename from tools/preproc/utf8.h rename to tools/src/preproc/utf8.h