aboutsummaryrefslogtreecommitdiff
path: root/examples/sound/vagsample/makefile
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2021-10-06 10:31:45 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2021-10-06 10:31:45 +0800
commit9e08d1047fa8deeb3ccb3ce9bb11d69e25a52d56 (patch)
tree32eb3f52ae7818898b7b4918f7f00f113b0bb302 /examples/sound/vagsample/makefile
parentffa679d4d24b891cb59aba10946368f2ec00c391 (diff)
downloadpsn00bsdk-9e08d1047fa8deeb3ccb3ce9bb11d69e25a52d56.tar.gz
Fixed bugs in SPU library, added vagsample example
Diffstat (limited to 'examples/sound/vagsample/makefile')
-rw-r--r--examples/sound/vagsample/makefile65
1 files changed, 65 insertions, 0 deletions
diff --git a/examples/sound/vagsample/makefile b/examples/sound/vagsample/makefile
new file mode 100644
index 0000000..acbaaad
--- /dev/null
+++ b/examples/sound/vagsample/makefile
@@ -0,0 +1,65 @@
+# 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 = vagsample
+
+## 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