aboutsummaryrefslogtreecommitdiff
path: root/src/spman/Makefile
blob: 68c19ffc5bf2ef2044e55ab98352bf775c1ecba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
LIB := ../../lib/spman.lib
all: $(LIB)

include ../../config.env

CC := sdcc
AR := sdar
CFLAGS := -mz80 --Werror -I../../include --fsigned-char --std-sdcc99 --opt-code-speed $(EXTRA_CFLAGS)

SOURCES := $(wildcard *.c)
OBJS := $(patsubst %.c,%.rel,$(SOURCES))
EXTS := $(patsubst %.c,%.asm,$(SOURCES)) $(patsubst %.c,%.lst,$(SOURCES)) $(patsubst %.c,%.sym,$(SOURCES))
$(LIB): $(OBJS)
	$(AR) -rcD $(LIB) $(OBJS)

%.rel: %.c
	$(CC) $(CFLAGS) $(LDFLAGS) -c $<

.PHONY: clean
clean:
	rm -f $(EXTS) $(OBJS) $(LIB)