diff options
Diffstat (limited to 'examples/graphics/billboard')
| -rw-r--r-- | examples/graphics/billboard/CMakeLists.txt | 28 | ||||
| -rw-r--r-- | examples/graphics/billboard/makefile | 65 | ||||
| -rw-r--r-- | examples/graphics/billboard/tim.s.template (renamed from examples/graphics/billboard/tim.s) | 3 |
3 files changed, 29 insertions, 67 deletions
diff --git a/examples/graphics/billboard/CMakeLists.txt b/examples/graphics/billboard/CMakeLists.txt new file mode 100644 index 0000000..bf73297 --- /dev/null +++ b/examples/graphics/billboard/CMakeLists.txt @@ -0,0 +1,28 @@ +# PSn00bSDK example CMake script +# (C) 2021 spicyjpeg - MPL licensed + +cmake_minimum_required(VERSION 3.21) + +if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS}) + set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake) +endif() + +project( + billboard + LANGUAGES C ASM + VERSION 1.0.0 + DESCRIPTION "PSn00bSDK billboard sprite example" + HOMEPAGE_URL "http://lameguy64.net/?page=psn00bsdk" +) + +configure_file(tim.s.template tim.s) + +file(GLOB _sources *.c) +psn00bsdk_add_executable( + billboard STATIC + ${_sources} + ${PROJECT_BINARY_DIR}/tim.s +) +#psn00bsdk_add_cd_image(billboard_iso billboard iso.xml DEPENDS billboard) + +install(FILES ${PROJECT_BINARY_DIR}/billboard.exe DESTINATION .) diff --git a/examples/graphics/billboard/makefile b/examples/graphics/billboard/makefile deleted file mode 100644 index 462e73c..0000000 --- a/examples/graphics/billboard/makefile +++ /dev/null @@ -1,65 +0,0 @@ -# PSn00bSDK makefile template -# Part of the PSn00bSDK Project -# 2019 - 2021 Lameguy64 / Meido-Tek Productions - -## Settings - -PSN00BSDK_LIBS ?= ../../../libpsn00b - -# Edit this to point to psn00bsdk-setup.mk, or copy that over to your project's -# root folder (it only depends on environment variables). -include ../../../psn00bsdk-setup.mk - -# Project target name -TARGET = billboard - -## Files - -# Searches for C, C++ and S (assembler) files in local directory -CFILES = $(notdir $(wildcard *.c)) -CPPFILES= $(notdir $(wildcard *.cpp)) -AFILES = $(notdir $(wildcard *.s)) - -# Create names for object files -OFILES = $(addprefix build/,$(CFILES:.c=.o)) \ - $(addprefix build/,$(CPPFILES:.cpp=.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: iso -all: build/$(TARGET) - -iso: build/$(TARGET) resources - $(MKPSXISO) -y -q iso.xml - -resources: - # Add commands to build/convert your assets here - #$(LZPACK) data.xml - -build/$(TARGET): $(OFILES) - @mkdir -p $(dir $@) - $(LD) $(LDFLAGS_EXE) $(LIBDIRS) $^ $(LIBS) -o $@ - $(NM) -f posix -l -n $@ >$@.map - $(ELF2X) -q $@ $@.exe - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS_EXE) $(INCLUDE) -c $< -o $@ - -build/%.o: %.cpp - @mkdir -p $(dir $@) - $(CXX) $(CPPFLAGS_EXE) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS_EXE) $(INCLUDE) -c $< -o $@ - -clean: - rm -rf build diff --git a/examples/graphics/billboard/tim.s b/examples/graphics/billboard/tim.s.template index 1fa8d69..fbe7522 100644 --- a/examples/graphics/billboard/tim.s +++ b/examples/graphics/billboard/tim.s.template @@ -3,5 +3,4 @@ .global tim_image .type tim_image, @object tim_image: - .incbin "texture64.tim" -
\ No newline at end of file + .incbin "${PROJECT_SOURCE_DIR}/texture64.tim" |
