#!/bin/bash -ex # # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # TARGET=f256lib.h cat f256lib/docs.h > ${TARGET} cat f256lib/stddclmr.h >> ${TARGET} echo "#ifndef F256LIB_AMALGAMATED_BUILD" >> ${TARGET} echo "#define F256LIB_AMALGAMATED_BUILD" >> ${TARGET} cat f256lib/f_api.h >> ${TARGET} cat include/f256_dma.h >> ${TARGET} cat include/f256_intmath.h >> ${TARGET} cat include/f256_irq.h >> ${TARGET} cat include/f256jr.h >> ${TARGET} cat include/f256_rtc.h >> ${TARGET} cat include/f256_sprites.h >> ${TARGET} cat include/f256_tiles.h >> ${TARGET} cat include/f256_timers.h >> ${TARGET} cat include/f256_via.h >> ${TARGET} cat include/f256_xymath.h >> ${TARGET} cat f256lib/f256.h >> ${TARGET} cat f256lib/f_kernel.h >> ${TARGET} cat f256lib/f_dma.h >> ${TARGET} cat f256lib/f_math.h >> ${TARGET} cat f256lib/f_random.h >> ${TARGET} cat f256lib/f_text.h >> ${TARGET} cat f256lib/f_bitmap.h >> ${TARGET} cat f256lib/f_tile.h >> ${TARGET} cat f256lib/f_graphics.h >> ${TARGET} cat f256lib/f_sprite.h >> ${TARGET} cat f256lib/f_file.h >> ${TARGET} cat f256lib/f_platform.h >> ${TARGET} echo "#ifdef F256LIB_IMPLEMENTATION" >> ${TARGET} cat f256lib/f256.c >> ${TARGET} cat f256lib/f_kernel.c >> ${TARGET} cat f256lib/f_dma.c >> ${TARGET} cat f256lib/f_math.c >> ${TARGET} cat f256lib/f_random.c >> ${TARGET} cat f256lib/f_text.c >> ${TARGET} cat f256lib/f_bitmap.c >> ${TARGET} cat f256lib/f_tile.c >> ${TARGET} cat f256lib/f_graphics.c >> ${TARGET} cat f256lib/f_sprite.c >> ${TARGET} cat f256lib/f_file.c >> ${TARGET} cat f256lib/f_platform.c >> ${TARGET} echo "#endif // F256LIB_IMPLEMENTATION" >> ${TARGET} echo "#endif // F256LIB_AMALGAMATED_BUILD" >> ${TARGET}