aboutsummaryrefslogtreecommitdiff
path: root/src/spman/Makefile
blob: ea2871e81024e037762cc2cfe394341c93aa256f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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))
CLEAN := $(patsubst %.c,%.asm,$(SOURCES)) $(patsubst %.c,%.lst,$(SOURCES)) $(patsubst %.c,%.sym,$(SOURCES)) \
	 $(OBJS) $(LIB)
$(LIB): $(OBJS)
	$(AR) -rcD $(LIB) $(OBJS)

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

.PHONY: clean
clean:
	rm -f $(CLEAN)