diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-09-12 19:39:06 +0200 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-09-12 19:39:06 +0200 |
| commit | d4c6605a12d31e84d1cba2f5ef7329bcb99c8aaf (patch) | |
| tree | 666d5d508277cdb3e5a6d0c2d98398f5093ab5d3 /libpsn00b | |
| parent | c6548f077282f871bc22bd05595d3a1139f50a80 (diff) | |
| download | psn00bsdk-d4c6605a12d31e84d1cba2f5ef7329bcb99c8aaf.tar.gz | |
Migrated libpsn00b to CMake
Diffstat (limited to 'libpsn00b')
| -rw-r--r-- | libpsn00b/CMakeLists.txt | 69 | ||||
| -rw-r--r-- | libpsn00b/include/lzp/lzp.h | 223 | ||||
| -rw-r--r-- | libpsn00b/include/lzp/lzqlp.h | 26 | ||||
| -rw-r--r-- | libpsn00b/libc/makefile | 61 | ||||
| -rw-r--r-- | libpsn00b/lzp/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/makefile | 23 | ||||
| -rw-r--r-- | libpsn00b/psxapi/makefile | 61 | ||||
| -rw-r--r-- | libpsn00b/psxcd/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/psxetc/dl.c | 2 | ||||
| -rw-r--r-- | libpsn00b/psxetc/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/psxgpu/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/psxgte/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/psxsio/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/psxspu/makefile | 59 | ||||
| -rw-r--r-- | libpsn00b/readme.txt | 2 |
15 files changed, 320 insertions, 560 deletions
diff --git a/libpsn00b/CMakeLists.txt b/libpsn00b/CMakeLists.txt new file mode 100644 index 0000000..52914d3 --- /dev/null +++ b/libpsn00b/CMakeLists.txt @@ -0,0 +1,69 @@ +# libpsn00b build script +# (C) 2021 spicyjpeg - MPL licensed + +cmake_minimum_required(VERSION 3.21) + +# ${PROJECT_SOURCE_DIR} is not available until project() is called. +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/cmake/sdk.cmake) + +project( + libpsn00b + LANGUAGES C CXX ASM + DESCRIPTION "PSn00bSDK libraries" + HOMEPAGE_URL "http://lameguy64.net/?page=psn00bsdk" +) + +if(NOT DEFINED PSN00BSDK_LIBGCC) + message(FATAL_ERROR "Failed to obtain information about the GCC toolchain. Check your toolchain settings.") +elseif(PSN00BSDK_LIBGCC STREQUAL "PSN00BSDK_LIBGCC-NOTFOUND") + message(FATAL_ERROR "Failed to find libgcc in the GCC toolchain's files. Check your toolchain settings, or set the path to libgcc using -DPSN00BSDK_LIBGCC.") +endif() + +## Libraries + +foreach(_library IN LISTS PSN00BSDK_LIBRARIES) + # libc needs special handling due to the different directory name. + if(${_library} STREQUAL "c") + set(_path ${PROJECT_SOURCE_DIR}/libc) + else() + set(_path ${PROJECT_SOURCE_DIR}/${_library}) + endif() + + file( + GLOB_RECURSE _sources + ${_path}/*.s + ${_path}/*.c + ${_path}/*.cpp + ${_path}/*.cxx + ) + + psn00bsdk_add_library(${_library} STATIC ${_sources}) +endforeach() + +# Extract libgcc's contents and merge them into libc after building. +add_custom_command( + TARGET c POST_BUILD + COMMAND ${CMAKE_AR} x ${PSN00BSDK_LIBGCC} + COMMAND ${CMAKE_AR} rsuU $<TARGET_FILE:c> *.o + COMMENT "Merging libgcc contents into SDK libc" +) + +## Installation + +install( + TARGETS ${PSN00BSDK_LIBRARIES} ${PSN00BSDK_VIRTUAL_TARGETS} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpsn00b + EXPORT libpsn00b +) +install( + DIRECTORY cmake include ldscripts + DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpsn00b +) + +# Generate an import script, which will be used by the setup script to find the +# libraries. +install( + EXPORT libpsn00b + DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpsn00b/cmake + #EXPORT_LINK_INTERFACE_LIBRARIES +) diff --git a/libpsn00b/include/lzp/lzp.h b/libpsn00b/include/lzp/lzp.h new file mode 100644 index 0000000..ffd7933 --- /dev/null +++ b/libpsn00b/include/lzp/lzp.h @@ -0,0 +1,223 @@ +/*! \file lzp.h + * \brief Main library header + */ + +/*! \mainpage + * \version 0.20b + * \author John Wilbert 'Lameguy64' Villamor + * + * \section creditsSection Credits + * - LZ77 data compression/decompression routines based from Ilya Muravyov's + * crush.cpp released under public domain. Refined and ported to C by Lameguy64. + * - CRC calculation routines based from Lammert Bies' lib_crc routines. + * + */ + +#ifndef _LZPACK_H +#define _LZPACK_H + +#include <sys/types.h> +#ifdef _WIN32 +#include <windows.h> +#endif + +/*! \addtogroup crcBaseRemainders CRC Base Remainder Values + * @{ + */ +//! Initial remainder value for lzCRC16() +#define LZP_CRC16_REMAINDER 0x0000 +//! Initial remainder value for lzCRC32() +#define LZP_CRC32_REMAINDER 0xFFFFFFFF +/*! @} */ + + +/*! \addtogroup compLevels Compression Levels + * \brief Compression levels for the lzCompress() function. + * @{ + */ +//! Minimal (but fast) compression +#define LZP_COMPRESS_FAST 0 +//! Normal compression level +#define LZP_COMPRESS_NORMAL 1 +//! Maximum compression level +#define LZP_COMPRESS_MAX 2 +/*! @} */ + + +/*! \addtogroup libraryErrorCodes Library Error Codes + * @{ + */ +//! No error +#define LZP_ERR_NONE 0 +//! Decompression error +#define LZP_ERR_DECOMPRESS -1 +//! Not a valid LZP/QLP/PCK archive +#define LZP_ERR_INVALID_PACK -2 +//! File not found +#define LZP_ERR_NOTFOUND -3 +//! CRC check mismatch (data corruption) +#define LZP_ERR_CRC_MISMATCH -4 +/*! @} */ + + +//! Header structure of an LZP format archive file +typedef struct { + + //! File ID (must always be 'LZP') + char id[3]; + //! File count + u_char numFiles; + +} LZP_HEAD; + +//! File entry structure for an LZP format archive file +typedef struct { + + //! File name + char fileName[16]; + //! CRC32 checksum of file + u_int crc; + //! Original size of file in bytes + u_int fileSize; + //! Compressed size of file + u_int packedSize; + //! File data offset + u_int offset; + +} LZP_FILE; + + +// Function prototypes +#ifdef __cplusplus +extern "C" { +#endif + + +/*! \addtogroup compressFuncs Data Compression and Decompression Functions + * \brief Functions to compress and decompress data. + * @{ + */ + +/*! Compress a block of data. + * + * \details This function compresses a specified block of data in LZ77 encoding. + * Depending on the size of the input data and speed of the computer, compression + * may take a while to complete. + * + * \param[out] *outBuff Pointer to buffer to store compressed data. + * \param[in] *inBuff Pointer to data to compress. + * \param[in] inSize Size of data to compress in bytes. + * \param[in] level Compression level (see \ref compLevels). + * + * \returns The size of the compressed data in bytes. + */ +int lzCompress(void* outBuff, void* inBuff, int inSize, int level); + +/*! Decompress a compressed block of data. + * + * \details Decompressed a compressed block of data produced by lzCompress(). It cannot + * return the decompressed size of the data ahead of time so you must preserve the decompressed + * size of the data yourself. + * + * \note The decompression algorithm used in this function is completely independent + * of the compression settings set by lzSetHashSizes() before compressing the data with + * lzCompress(). + * + * \param[out] *outBuff Pointer to buffer to store decompressed data. + * \param[in] *inBuff Pointer to compressed data to decompress. + * \param[in] inSize Compressed data size in bytes. + * + * \returns Size of decompressed data in bytes or LZP_ERR_DECOMPRESS if a + * decompression error occurred. + */ +int lzDecompress(void* outBuff, void* inBuff, int inSize); + +int lzDecompressLen(void* outBuff, int outSize, void* inBuff, int inSize); + +/*! Sets the sizes of hash tables for data compression. + * + * \param[in] window Sliding window size. + * \param[in] hash1 Hash table 1 size. + * \param[in] hash2 Hash table 2 size. + */ +void lzSetHashSizes(int window, int hash1, int hash2); + +/*! Reset the sizes of hash tables to their defaults. + */ +void lzResetHashSizes(); + +/*! @} */ + + +/*! \addtogroup crcFuncs CRC Hashing Functions + * \brief Functions to calculate CRC hashes of data. + * @{ + */ + +/*! Calculates a CRC16 hash of the specified buffer. + * + * \param[in] *buff Pointer to buffer to calculate a hash of. + * \param[in] bytes Size of buffer in bytes. + * \param[in] crc CRC remainder (use LZP_CRC16_REMAINDER). + * + * \returns CRC16 hash of specified buffer. + */ +unsigned short lzCRC16(void* buff, int bytes, unsigned short crc); + +/*! Calculates a CRC32 hash of the specified buffer. + * + * \param[in] *buff Pointer to buffer to calculate a hash of. + * \param[in] bytes Size of buffer in bytes. + * \param[in] crc CRC remainder (use LZP_CRC16_REMAINDER). + * + * \returns CRC32 hash of specified buffer. + */ +unsigned int lzCRC32(void* buff, int bytes, unsigned int crc); + +/*! @} */ + + +/*! \addtogroup lzpFunctions LZP Archive Handling Routines + * \brief Functions to index and unpack files from LZP archives. + * @{ + */ + +/*! Searches for a file by name in an LZP archive and returns a file entry number. + * + * \param[in] *fileName String of file to search (must be less than 13 characters). + * \param[in] *lzpack Pointer to LZP archive file. + * + * \returns File index of found file or one of \ref libraryErrorCodes if an error occurred. + */ +int lzpSearchFile(const char* fileName, void* lzpack); + +int lzpFileSize(void* lzpack, int fileNum); + +/*! Get a pointer to a file entry inside of an LZP archive. + * + * \param[in] *lzpack Pointer to LZP archive file. + * \param[in] fileNum File number to get an entry of (you may use lzpSearchFile()). + * + * \returns A pointer to an LZP_FILE struct or NULL if an error occurred. + */ +LZP_FILE* lzpFileEntry(void* lzpack, int fileNum); + +/*! Unpacks a file from an LZP archive to the specified memory buffer. + * + * \param[in] *buff Pointer to buffer to store unpacked file. + * \param[in] *lzpack Pointer to LZP archive file. + * \param[in] fileNum File entry number of file to extract (you may use lzpSearchFile()). + * + * \returns Size of decompressed file in bytes or one of \ref libraryErrorCodes if an error occurred. + */ +int lzpUnpackFile(void* buff, void* lzpack, int fileNum); + +/*! @} */ + + +#ifdef __cplusplus +} +#endif + + +#endif // _LZPACK_H diff --git a/libpsn00b/include/lzp/lzqlp.h b/libpsn00b/include/lzp/lzqlp.h new file mode 100644 index 0000000..fae6438 --- /dev/null +++ b/libpsn00b/include/lzp/lzqlp.h @@ -0,0 +1,26 @@ +#ifndef _QLP_H +#define _QLP_H + +#define PACK_ERR_NONE 0 +#define PACK_ERR_INVALID -1 +#define PACK_ERR_NOTFOUND -2 +#define PACK_ERR_INCOMPLETE -3 +#define PACK_ERR_READ_FAULT -4 + +typedef struct { + char id[3]; + unsigned char numfiles; +} QLP_HEAD; + +typedef struct { + char name[16]; + unsigned int size; + unsigned int offs; +} QLP_FILE; + +int qlpFileCount(void* qlpfile); +QLP_FILE* qlpFileEntry(int index, void* qlpfile); +void* qlpFileAddr(int index, void* qlpfile); +int qlpFindFile(char* fileName, void* qlpfile); + +#endif // _QLP_H
\ No newline at end of file diff --git a/libpsn00b/libc/makefile b/libpsn00b/libc/makefile deleted file mode 100644 index bb3a687..0000000 --- a/libpsn00b/libc/makefile +++ /dev/null @@ -1,61 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libc.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - # "Import" libgcc's contents - cp $(GCC_BASE)/lib/gcc/$(PREFIX)/$(GCC_VERSION)/libgcc.a ./$@ - $(AR) rs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/lzp/makefile b/libpsn00b/lzp/makefile deleted file mode 100644 index 02654ed..0000000 --- a/libpsn00b/lzp/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = liblzp.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/makefile b/libpsn00b/makefile deleted file mode 100644 index c2cf62f..0000000 --- a/libpsn00b/makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Run using make (Linux) or gmake (BSD) -# Part of the PSn00bSDK Project -# 2019 - 2020 Lameguy64 / Meido-Tek Productions - -TOPTARGETS = all clean - -LIBS = libc psxgpu psxapi psxgte psxcd psxetc psxsio psxspu lzp - -$(TOPTARGETS): $(LIBS) - -install: $(LIBS) -ifdef PSN00BSDK_LIBS -ifneq ($(CURDIR),$(PSN00BSDK_LIBS)) # needs a better method - cp -R include $(PSN00BSDK_LIBS)/include -endif -endif - -clean: $(LIBS) - -$(LIBS): - @$(MAKE) -C $@ $(MAKECMDGOALS) - -.PHONY: $(TOPTARGETS) $(LIBS) diff --git a/libpsn00b/psxapi/makefile b/libpsn00b/psxapi/makefile deleted file mode 100644 index f300e5f..0000000 --- a/libpsn00b/psxapi/makefile +++ /dev/null @@ -1,61 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxapi.a - -## Files - -SOURCES = stdio fs sys - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.c)) -CXXFILES= $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.cxx)) -AFILES = $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/psxcd/makefile b/libpsn00b/psxcd/makefile deleted file mode 100644 index ee9b958..0000000 --- a/libpsn00b/psxcd/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxcd.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/psxetc/dl.c b/libpsn00b/psxetc/dl.c index 1485183..e405efc 100644 --- a/libpsn00b/psxetc/dl.c +++ b/libpsn00b/psxetc/dl.c @@ -35,7 +35,7 @@ /* Compile options */ // Uncomment before building to enable debug logging (via printf()). -#define DEBUG +//#define DEBUG // Comment before building to disable functions that rely on BIOS file APIs, // i.e. DL_LoadSymbolMap() and dlopen(). diff --git a/libpsn00b/psxetc/makefile b/libpsn00b/psxetc/makefile deleted file mode 100644 index 84bb64b..0000000 --- a/libpsn00b/psxetc/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxetc.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/psxgpu/makefile b/libpsn00b/psxgpu/makefile deleted file mode 100644 index adcb7fa..0000000 --- a/libpsn00b/psxgpu/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxgpu.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/psxgte/makefile b/libpsn00b/psxgte/makefile deleted file mode 100644 index e60ff1e..0000000 --- a/libpsn00b/psxgte/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxgte.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/psxsio/makefile b/libpsn00b/psxsio/makefile deleted file mode 100644 index c9dcade..0000000 --- a/libpsn00b/psxsio/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxsio.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/psxspu/makefile b/libpsn00b/psxspu/makefile deleted file mode 100644 index 5710f39..0000000 --- a/libpsn00b/psxspu/makefile +++ /dev/null @@ -1,59 +0,0 @@ -# PSn00bSDK library makefile -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= .. - -include ../../psn00bsdk-setup.mk - -# Project target name -TARGET = libpsxspu.a - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CXXFILES= $(notdir $(wildcard *.cxx)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CXXFILES:.cxx=.o)) \ - $(addprefix build/,$(AFILES:.s=.o)) - -# Project specific includes and libraries -# (use -I for include dirs, -L for library dirs, -l for static libraries) -INCLUDE += -LIBDIRS += -LIBS += - -## Build rules - -all: build/$(TARGET) - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(AR) crs $@ $(OFILES) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cxx - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_LIB) $(INCLUDE) -c $< -o $@ - -install: -ifneq ($(PSN00BSDK_LIBS), "..") - @mkdir -p $(PSN00BSDK_LIBS) -endif - cp build/$(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) - -clean: - rm -rf build diff --git a/libpsn00b/readme.txt b/libpsn00b/readme.txt index 940746c..9f6ebc6 100644 --- a/libpsn00b/readme.txt +++ b/libpsn00b/readme.txt @@ -49,7 +49,7 @@ Brief summary of libraries: must be covered in the changelog.txt file. -Compiling: +Compiling (OUTDATED): To compile the LibPSn00b libraries, you will first need a working GCC toolchain which you can either build yourself as described in the |
