blob: ff6e632b1613548294d32eb473f0a096e0ed4832 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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)
|