aboutsummaryrefslogtreecommitdiff
path: root/lib/plw/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-11-05 11:22:55 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-11-05 11:31:28 +0000
commit2fbdf974338bde8576efdae40a819a76b2391033 (patch)
tree64d41a37470143f142344f9a439d96de3e7918c2 /lib/plw/Makefile
downloadkitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.tar.gz
kitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.zip
Initial import of the open source release
Diffstat (limited to 'lib/plw/Makefile')
-rw-r--r--lib/plw/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/plw/Makefile b/lib/plw/Makefile
new file mode 100644
index 0000000..ff6e632
--- /dev/null
+++ b/lib/plw/Makefile
@@ -0,0 +1,34 @@
+LIB=plw.lib
+
+all: $(LIB)
+
+CC=sdcc
+AS=sdasz80
+AR=sdar
+CFLAGS=-mz80 --Werror --fsigned-char --std-sdcc99 --opt-code-speed
+LDFLAGS=--no-std-crt0 --fomit-frame-pointer
+
+lib_SRCS=$(wildcard *.z80)
+lib_OBJS=$(patsubst %.z80,%.rel,$(lib_SRCS))
+
+$(LIB): $(lib_OBJS) plw_player.rel
+ $(AR) -rcD $(LIB) $(lib_OBJS)
+ cp $(LIB) ..
+ cp plw_player.rel ../
+
+plw_player.rel: plw_player.c player/plw_player.h
+
+player/plw_player.h:
+ make -C player
+
+%.rel: %.z80
+ $(AS) -o $<
+
+%.rel: %.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -c $<
+
+.PHONY: clean
+clean:
+ make -C player clean
+ rm -f *.bin *.rel *.lk *.noi *.map *.ihx *.sym *.lst *.zx7 player.asm $(LIB)
+