diff options
| author | Lameguy64 <lameguy64@gmail.com> | 2021-10-25 10:51:50 +0800 |
|---|---|---|
| committer | Lameguy64 <lameguy64@gmail.com> | 2021-10-25 10:51:50 +0800 |
| commit | 538f28cfbbbb8163ab8a96de77d6887123856c81 (patch) | |
| tree | a3108f05c038d0f43f2e96ae4d2d34ce4da225b4 /indev/psxpad/makefile | |
| parent | 7718b576b7aba725455ce510ee9632067a65f0d7 (diff) | |
| download | psn00bsdk-538f28cfbbbb8163ab8a96de77d6887123856c81.tar.gz | |
Added indev directory
Diffstat (limited to 'indev/psxpad/makefile')
| -rw-r--r-- | indev/psxpad/makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/indev/psxpad/makefile b/indev/psxpad/makefile new file mode 100644 index 0000000..ab6a733 --- /dev/null +++ b/indev/psxpad/makefile @@ -0,0 +1,39 @@ +include ../../examples/sdk-common.mk + +TARGET = libpad.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 = -lsiofs -lpsxsio -lpsxetc -lpsxgpu -lpsxgte -lpsxspu -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 + +CC = $(PREFIX)gcc +CXX = $(PREFIX)g++ +AS = $(PREFIX)as +LD = $(PREFIX)ld + +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) |
