diff --git a/configure b/configure index 83b29f557..2fa452403 100755 --- a/configure +++ b/configure @@ -794,6 +794,7 @@ find_sdlconfig SRC="src" SRC_OS="$SRC/os" +SRC_LIB="$SRC/lib" CORE="$SRC/emucore" COMMON="$SRC/common" TIA="$SRC/emucore/tia" @@ -804,14 +805,14 @@ DBG="$SRC/debugger" DBGGUI="$SRC/debugger/gui" YACC="$SRC/yacc" CHEAT="$SRC/cheat" -LIBPNG="$SRC/libpng" -LIBJPG="$SRC/nanojpeg" -LIBJPGEXIF="$SRC/tinyexif" -ZLIB="$SRC/zlib" +LIBPNG="$SRC_LIB/libpng" +LIBJPG="$SRC_LIB/nanojpeg" +LIBJPGEXIF="$SRC_LIB/tinyexif" +ZLIB="$SRC_LIB/zlib" SQLITE_REPO="$SRC/common/repository/sqlite" -SQLITE_LIB="$SRC/sqlite" -JSON="$SRC/json" -HTTP_LIB="$SRC/httplib" +SQLITE_LIB="$SRC_LIB/sqlite" +JSON="$SRC_LIB/json" +HTTP_LIB="$SRC_LIB/httplib" INCLUDES="-I$CORE -I$COMMON -I$TV -I$TIA -I$TIA_FRAME_MANAGER -I$JSON -I$SQLITE_REPO" diff --git a/src/httplib/LICENSE b/src/lib/httplib/LICENSE similarity index 100% rename from src/httplib/LICENSE rename to src/lib/httplib/LICENSE diff --git a/src/httplib/README.md b/src/lib/httplib/README.md similarity index 100% rename from src/httplib/README.md rename to src/lib/httplib/README.md diff --git a/src/httplib/http_lib.hxx b/src/lib/httplib/http_lib.hxx similarity index 100% rename from src/httplib/http_lib.hxx rename to src/lib/httplib/http_lib.hxx diff --git a/src/httplib/httplib.h b/src/lib/httplib/httplib.h similarity index 100% rename from src/httplib/httplib.h rename to src/lib/httplib/httplib.h diff --git a/src/json/LICENSE.MIT b/src/lib/json/LICENSE.MIT similarity index 100% rename from src/json/LICENSE.MIT rename to src/lib/json/LICENSE.MIT diff --git a/src/json/README.md b/src/lib/json/README.md similarity index 100% rename from src/json/README.md rename to src/lib/json/README.md diff --git a/src/json/json.hxx b/src/lib/json/json.hxx similarity index 100% rename from src/json/json.hxx rename to src/lib/json/json.hxx diff --git a/src/json/json_lib.hxx b/src/lib/json/json_lib.hxx similarity index 100% rename from src/json/json_lib.hxx rename to src/lib/json/json_lib.hxx diff --git a/src/lib/libpng/module.mk b/src/lib/libpng/module.mk new file mode 100644 index 000000000..d450711b5 --- /dev/null +++ b/src/lib/libpng/module.mk @@ -0,0 +1,24 @@ +MODULE := src/lib/libpng + +MODULE_OBJS := \ + src/lib/libpng/png.o \ + src/lib/libpng/pngerror.o \ + src/lib/libpng/pngget.o \ + src/lib/libpng/pngmem.o \ + src/lib/libpng/pngpread.o \ + src/lib/libpng/pngread.o \ + src/lib/libpng/pngrio.o \ + src/lib/libpng/pngrtran.o \ + src/lib/libpng/pngrutil.o \ + src/lib/libpng/pngset.o \ + src/lib/libpng/pngtrans.o \ + src/lib/libpng/pngwio.o \ + src/lib/libpng/pngwrite.o \ + src/lib/libpng/pngwtran.o \ + src/lib/libpng/pngwutil.o + +MODULE_DIRS += \ + src/lib/libpng + +# Include common rules +include $(srcdir)/common.rules diff --git a/src/libpng/png.c b/src/lib/libpng/png.c similarity index 100% rename from src/libpng/png.c rename to src/lib/libpng/png.c diff --git a/src/libpng/png.h b/src/lib/libpng/png.h similarity index 100% rename from src/libpng/png.h rename to src/lib/libpng/png.h diff --git a/src/libpng/pngconf.h b/src/lib/libpng/pngconf.h similarity index 100% rename from src/libpng/pngconf.h rename to src/lib/libpng/pngconf.h diff --git a/src/libpng/pngdebug.h b/src/lib/libpng/pngdebug.h similarity index 100% rename from src/libpng/pngdebug.h rename to src/lib/libpng/pngdebug.h diff --git a/src/libpng/pngerror.c b/src/lib/libpng/pngerror.c similarity index 100% rename from src/libpng/pngerror.c rename to src/lib/libpng/pngerror.c diff --git a/src/libpng/pngget.c b/src/lib/libpng/pngget.c similarity index 100% rename from src/libpng/pngget.c rename to src/lib/libpng/pngget.c diff --git a/src/libpng/pnginfo.h b/src/lib/libpng/pnginfo.h similarity index 100% rename from src/libpng/pnginfo.h rename to src/lib/libpng/pnginfo.h diff --git a/src/libpng/pnglibconf.h b/src/lib/libpng/pnglibconf.h similarity index 100% rename from src/libpng/pnglibconf.h rename to src/lib/libpng/pnglibconf.h diff --git a/src/libpng/pngmem.c b/src/lib/libpng/pngmem.c similarity index 100% rename from src/libpng/pngmem.c rename to src/lib/libpng/pngmem.c diff --git a/src/libpng/pngpread.c b/src/lib/libpng/pngpread.c similarity index 100% rename from src/libpng/pngpread.c rename to src/lib/libpng/pngpread.c diff --git a/src/libpng/pngpriv.h b/src/lib/libpng/pngpriv.h similarity index 100% rename from src/libpng/pngpriv.h rename to src/lib/libpng/pngpriv.h diff --git a/src/libpng/pngread.c b/src/lib/libpng/pngread.c similarity index 100% rename from src/libpng/pngread.c rename to src/lib/libpng/pngread.c diff --git a/src/libpng/pngrio.c b/src/lib/libpng/pngrio.c similarity index 100% rename from src/libpng/pngrio.c rename to src/lib/libpng/pngrio.c diff --git a/src/libpng/pngrtran.c b/src/lib/libpng/pngrtran.c similarity index 100% rename from src/libpng/pngrtran.c rename to src/lib/libpng/pngrtran.c diff --git a/src/libpng/pngrutil.c b/src/lib/libpng/pngrutil.c similarity index 100% rename from src/libpng/pngrutil.c rename to src/lib/libpng/pngrutil.c diff --git a/src/libpng/pngset.c b/src/lib/libpng/pngset.c similarity index 100% rename from src/libpng/pngset.c rename to src/lib/libpng/pngset.c diff --git a/src/libpng/pngstruct.h b/src/lib/libpng/pngstruct.h similarity index 100% rename from src/libpng/pngstruct.h rename to src/lib/libpng/pngstruct.h diff --git a/src/libpng/pngtrans.c b/src/lib/libpng/pngtrans.c similarity index 100% rename from src/libpng/pngtrans.c rename to src/lib/libpng/pngtrans.c diff --git a/src/libpng/pngwio.c b/src/lib/libpng/pngwio.c similarity index 100% rename from src/libpng/pngwio.c rename to src/lib/libpng/pngwio.c diff --git a/src/libpng/pngwrite.c b/src/lib/libpng/pngwrite.c similarity index 100% rename from src/libpng/pngwrite.c rename to src/lib/libpng/pngwrite.c diff --git a/src/libpng/pngwtran.c b/src/lib/libpng/pngwtran.c similarity index 100% rename from src/libpng/pngwtran.c rename to src/lib/libpng/pngwtran.c diff --git a/src/libpng/pngwutil.c b/src/lib/libpng/pngwutil.c similarity index 100% rename from src/libpng/pngwutil.c rename to src/lib/libpng/pngwutil.c diff --git a/src/nanojpeg/nanojpeg.c b/src/lib/nanojpeg/nanojpeg.c similarity index 100% rename from src/nanojpeg/nanojpeg.c rename to src/lib/nanojpeg/nanojpeg.c diff --git a/src/nanojpeg/nanojpeg_lib.hxx b/src/lib/nanojpeg/nanojpeg_lib.hxx similarity index 100% rename from src/nanojpeg/nanojpeg_lib.hxx rename to src/lib/nanojpeg/nanojpeg_lib.hxx diff --git a/src/sqlite/module.mk b/src/lib/sqlite/module.mk similarity index 57% rename from src/sqlite/module.mk rename to src/lib/sqlite/module.mk index 829748fc5..bfb143ca9 100644 --- a/src/sqlite/module.mk +++ b/src/lib/sqlite/module.mk @@ -1,10 +1,10 @@ -MODULE := src/sqlite +MODULE := src/lib/sqlite MODULE_OBJS := \ - src/sqlite/sqlite3.o + src/lib/sqlite/sqlite3.o MODULE_DIRS += \ - src/sqlite + src/lib/sqlite # Include common rules include $(srcdir)/common.rules diff --git a/src/sqlite/source/sqlite3.c b/src/lib/sqlite/source/sqlite3.c similarity index 100% rename from src/sqlite/source/sqlite3.c rename to src/lib/sqlite/source/sqlite3.c diff --git a/src/sqlite/source/sqlite3.h b/src/lib/sqlite/source/sqlite3.h similarity index 100% rename from src/sqlite/source/sqlite3.h rename to src/lib/sqlite/source/sqlite3.h diff --git a/src/sqlite/sqlite3.c b/src/lib/sqlite/sqlite3.c similarity index 100% rename from src/sqlite/sqlite3.c rename to src/lib/sqlite/sqlite3.c diff --git a/src/sqlite/sqlite3.h b/src/lib/sqlite/sqlite3.h similarity index 100% rename from src/sqlite/sqlite3.h rename to src/lib/sqlite/sqlite3.h diff --git a/src/sqlite/sqlite_options.h b/src/lib/sqlite/sqlite_options.h similarity index 100% rename from src/sqlite/sqlite_options.h rename to src/lib/sqlite/sqlite_options.h diff --git a/src/tinyexif/module.mk b/src/lib/tinyexif/module.mk similarity index 55% rename from src/tinyexif/module.mk rename to src/lib/tinyexif/module.mk index 882915a66..1d59efe84 100644 --- a/src/tinyexif/module.mk +++ b/src/lib/tinyexif/module.mk @@ -1,10 +1,10 @@ -MODULE := src/tinyexif +MODULE := src/lib/tinyexif MODULE_OBJS := \ - src/tinyexif/tinyexif.o + src/lib/tinyexif/tinyexif.o MODULE_DIRS += \ - src/tinyexif + src/lib/tinyexif # Include common rules include $(srcdir)/common.rules diff --git a/src/tinyexif/source/README.md b/src/lib/tinyexif/source/README.md similarity index 100% rename from src/tinyexif/source/README.md rename to src/lib/tinyexif/source/README.md diff --git a/src/tinyexif/source/TinyEXIF.cpp b/src/lib/tinyexif/source/TinyEXIF.cpp similarity index 100% rename from src/tinyexif/source/TinyEXIF.cpp rename to src/lib/tinyexif/source/TinyEXIF.cpp diff --git a/src/tinyexif/source/TinyEXIF.h b/src/lib/tinyexif/source/TinyEXIF.h similarity index 100% rename from src/tinyexif/source/TinyEXIF.h rename to src/lib/tinyexif/source/TinyEXIF.h diff --git a/src/tinyexif/tinyexif.cxx b/src/lib/tinyexif/tinyexif.cxx similarity index 100% rename from src/tinyexif/tinyexif.cxx rename to src/lib/tinyexif/tinyexif.cxx diff --git a/src/tinyexif/tinyexif_lib.hxx b/src/lib/tinyexif/tinyexif_lib.hxx similarity index 100% rename from src/tinyexif/tinyexif_lib.hxx rename to src/lib/tinyexif/tinyexif_lib.hxx diff --git a/src/zlib/README b/src/lib/zlib/README similarity index 100% rename from src/zlib/README rename to src/lib/zlib/README diff --git a/src/zlib/adler32.c b/src/lib/zlib/adler32.c similarity index 100% rename from src/zlib/adler32.c rename to src/lib/zlib/adler32.c diff --git a/src/zlib/compress.c b/src/lib/zlib/compress.c similarity index 100% rename from src/zlib/compress.c rename to src/lib/zlib/compress.c diff --git a/src/zlib/crc32.c b/src/lib/zlib/crc32.c similarity index 100% rename from src/zlib/crc32.c rename to src/lib/zlib/crc32.c diff --git a/src/zlib/crc32.h b/src/lib/zlib/crc32.h similarity index 100% rename from src/zlib/crc32.h rename to src/lib/zlib/crc32.h diff --git a/src/zlib/deflate.c b/src/lib/zlib/deflate.c similarity index 100% rename from src/zlib/deflate.c rename to src/lib/zlib/deflate.c diff --git a/src/zlib/deflate.h b/src/lib/zlib/deflate.h similarity index 100% rename from src/zlib/deflate.h rename to src/lib/zlib/deflate.h diff --git a/src/zlib/gzclose.c b/src/lib/zlib/gzclose.c similarity index 100% rename from src/zlib/gzclose.c rename to src/lib/zlib/gzclose.c diff --git a/src/zlib/gzguts.h b/src/lib/zlib/gzguts.h similarity index 100% rename from src/zlib/gzguts.h rename to src/lib/zlib/gzguts.h diff --git a/src/zlib/gzlib.c b/src/lib/zlib/gzlib.c similarity index 100% rename from src/zlib/gzlib.c rename to src/lib/zlib/gzlib.c diff --git a/src/zlib/gzread.c b/src/lib/zlib/gzread.c similarity index 100% rename from src/zlib/gzread.c rename to src/lib/zlib/gzread.c diff --git a/src/zlib/gzwrite.c b/src/lib/zlib/gzwrite.c similarity index 100% rename from src/zlib/gzwrite.c rename to src/lib/zlib/gzwrite.c diff --git a/src/zlib/infback.c b/src/lib/zlib/infback.c similarity index 100% rename from src/zlib/infback.c rename to src/lib/zlib/infback.c diff --git a/src/zlib/inffast.c b/src/lib/zlib/inffast.c similarity index 100% rename from src/zlib/inffast.c rename to src/lib/zlib/inffast.c diff --git a/src/zlib/inffast.h b/src/lib/zlib/inffast.h similarity index 100% rename from src/zlib/inffast.h rename to src/lib/zlib/inffast.h diff --git a/src/zlib/inffixed.h b/src/lib/zlib/inffixed.h similarity index 100% rename from src/zlib/inffixed.h rename to src/lib/zlib/inffixed.h diff --git a/src/zlib/inflate.c b/src/lib/zlib/inflate.c similarity index 100% rename from src/zlib/inflate.c rename to src/lib/zlib/inflate.c diff --git a/src/zlib/inflate.h b/src/lib/zlib/inflate.h similarity index 100% rename from src/zlib/inflate.h rename to src/lib/zlib/inflate.h diff --git a/src/zlib/inftrees.c b/src/lib/zlib/inftrees.c similarity index 100% rename from src/zlib/inftrees.c rename to src/lib/zlib/inftrees.c diff --git a/src/zlib/inftrees.h b/src/lib/zlib/inftrees.h similarity index 100% rename from src/zlib/inftrees.h rename to src/lib/zlib/inftrees.h diff --git a/src/lib/zlib/module.mk b/src/lib/zlib/module.mk new file mode 100644 index 000000000..f536747ab --- /dev/null +++ b/src/lib/zlib/module.mk @@ -0,0 +1,24 @@ +MODULE := src/lib/zlib + +MODULE_OBJS := \ + src/lib/zlib/adler32.o \ + src/lib/zlib/compress.o \ + src/lib/zlib/crc32.o \ + src/lib/zlib/gzclose.o \ + src/lib/zlib/gzlib.o \ + src/lib/zlib/gzread.o \ + src/lib/zlib/gzwrite.o \ + src/lib/zlib/uncompr.o \ + src/lib/zlib/deflate.o \ + src/lib/zlib/trees.o \ + src/lib/zlib/zutil.o \ + src/lib/zlib/inflate.o \ + src/lib/zlib/infback.o \ + src/lib/zlib/inftrees.o \ + src/lib/zlib/inffast.o + +MODULE_DIRS += \ + src/lib/zlib + +# Include common rules +include $(srcdir)/common.rules diff --git a/src/zlib/trees.c b/src/lib/zlib/trees.c similarity index 100% rename from src/zlib/trees.c rename to src/lib/zlib/trees.c diff --git a/src/zlib/trees.h b/src/lib/zlib/trees.h similarity index 100% rename from src/zlib/trees.h rename to src/lib/zlib/trees.h diff --git a/src/zlib/uncompr.c b/src/lib/zlib/uncompr.c similarity index 100% rename from src/zlib/uncompr.c rename to src/lib/zlib/uncompr.c diff --git a/src/zlib/zconf.h b/src/lib/zlib/zconf.h similarity index 100% rename from src/zlib/zconf.h rename to src/lib/zlib/zconf.h diff --git a/src/zlib/zlib.h b/src/lib/zlib/zlib.h similarity index 100% rename from src/zlib/zlib.h rename to src/lib/zlib/zlib.h diff --git a/src/zlib/zutil.c b/src/lib/zlib/zutil.c similarity index 100% rename from src/zlib/zutil.c rename to src/lib/zlib/zutil.c diff --git a/src/zlib/zutil.h b/src/lib/zlib/zutil.h similarity index 100% rename from src/zlib/zutil.h rename to src/lib/zlib/zutil.h diff --git a/src/libpng/module.mk b/src/libpng/module.mk deleted file mode 100644 index 516cef851..000000000 --- a/src/libpng/module.mk +++ /dev/null @@ -1,24 +0,0 @@ -MODULE := src/libpng - -MODULE_OBJS := \ - src/libpng/png.o \ - src/libpng/pngerror.o \ - src/libpng/pngget.o \ - src/libpng/pngmem.o \ - src/libpng/pngpread.o \ - src/libpng/pngread.o \ - src/libpng/pngrio.o \ - src/libpng/pngrtran.o \ - src/libpng/pngrutil.o \ - src/libpng/pngset.o \ - src/libpng/pngtrans.o \ - src/libpng/pngwio.o \ - src/libpng/pngwrite.o \ - src/libpng/pngwtran.o \ - src/libpng/pngwutil.o - -MODULE_DIRS += \ - src/libpng - -# Include common rules -include $(srcdir)/common.rules diff --git a/src/os/libretro/Makefile.common b/src/os/libretro/Makefile.common index cc07e56c8..6975fdc19 100644 --- a/src/os/libretro/Makefile.common +++ b/src/os/libretro/Makefile.common @@ -1,5 +1,5 @@ LIBRETRO_COMM_DIR = $(CORE_DIR)/../libretro-common -INCFLAGS := -I. -I$(CORE_DIR) -I$(CORE_DIR)/os/libretro -I$(CORE_DIR)/emucore -I$(CORE_DIR)/emucore/tia -I$(CORE_DIR)/common -I$(CORE_DIR)/common/audio -I$(CORE_DIR)/common/tv_filters -I$(CORE_DIR)/common/repository/sqlite -I$(CORE_DIR)/json -I$(CORE_DIR)/httplib -I$(CORE_DIR)/sqlite +INCFLAGS := -I. -I$(CORE_DIR) -I$(CORE_DIR)/os/libretro -I$(CORE_DIR)/emucore -I$(CORE_DIR)/emucore/tia -I$(CORE_DIR)/common -I$(CORE_DIR)/common/audio -I$(CORE_DIR)/common/tv_filters -I$(CORE_DIR)/common/repository/sqlite -I$(CORE_DIR)/lib/json -I$(CORE_DIR)/lib/httplib -I$(CORE_DIR)/lib/sqlite ifneq (,$(findstring msvc2003,$(platform))) INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc diff --git a/src/zlib/module.mk b/src/zlib/module.mk deleted file mode 100644 index fe03715a8..000000000 --- a/src/zlib/module.mk +++ /dev/null @@ -1,24 +0,0 @@ -MODULE := src/zlib - -MODULE_OBJS := \ - src/zlib/adler32.o \ - src/zlib/compress.o \ - src/zlib/crc32.o \ - src/zlib/gzclose.o \ - src/zlib/gzlib.o \ - src/zlib/gzread.o \ - src/zlib/gzwrite.o \ - src/zlib/uncompr.o \ - src/zlib/deflate.o \ - src/zlib/trees.o \ - src/zlib/zutil.o \ - src/zlib/inflate.o \ - src/zlib/infback.o \ - src/zlib/inftrees.o \ - src/zlib/inffast.o - -MODULE_DIRS += \ - src/zlib - -# Include common rules -include $(srcdir)/common.rules