aboutsummaryrefslogtreecommitdiff
path: root/examples/graphics/hdtv/makefile
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2020-11-29 20:18:38 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2020-11-29 20:18:38 +0800
commit3d38a12ca171490e22c7b56cd19c008f2dadfb83 (patch)
tree543653494423391c02fa21f5688baa90c67fdabe /examples/graphics/hdtv/makefile
parent60deeff6e078271a17cf77c6204edbbde846f0bd (diff)
downloadpsn00bsdk-3d38a12ca171490e22c7b56cd19c008f2dadfb83.tar.gz
Defined MDEC registers, corrected SquareRoot12() lookup table typo, updated memmove(), removed redundant toolchain definitions, added HDTV example
Diffstat (limited to 'examples/graphics/hdtv/makefile')
-rw-r--r--examples/graphics/hdtv/makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/graphics/hdtv/makefile b/examples/graphics/hdtv/makefile
new file mode 100644
index 0000000..d9321bf
--- /dev/null
+++ b/examples/graphics/hdtv/makefile
@@ -0,0 +1,35 @@
+include ../../examples-setup.mk
+
+TARGET = hdtv.elf
+
+CFILES = $(notdir $(wildcard *.c))
+CPPFILES = $(notdir $(wildcard *.cpp))
+AFILES = $(notdir $(wildcard *.s))
+
+OFILES = $(addprefix build/,$(CFILES:.c=.o) $(CPPFILES:.cpp=.o) $(AFILES:.s=.o))
+
+INCLUDE +=
+LIBDIRS +=
+
+LIBS = -lpsxetc -lpsxgpu -lpsxgte -lpsxspu -lpsxetc -lpsxapi -lc
+LIBS = -lpsxgpu -lpsxgte -lpsxspu -lpsxetc -lpsxapi -lc
+
+CFLAGS = -g -O2 -fno-builtin -fdata-sections -ffunction-sections
+CPPFLAGS = $(CFLAGS) -fno-exceptions
+AFLAGS = -g -msoft-float
+LDFLAGS = -g -Ttext=0x80010000 -gc-sections -T $(GCC_BASE)/mipsel-unknown-elf/lib/ldscripts/elf32elmip.x
+
+all: $(OFILES)
+ $(LD) $(LDFLAGS) $(LIBDIRS) $(OFILES) $(LIBS) -o $(TARGET)
+ elf2x -q $(TARGET)
+
+build/%.o: %.c
+ @mkdir -p $(dir $@)
+ $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
+
+build/%.o: %.s
+ @mkdir -p $(dir $@)
+ $(CC) $(AFLAGS) $(INCLUDE) -c $< -o $@
+
+clean:
+ rm -rf build $(TARGET) $(TARGET:.elf=.exe)