aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 6608f43f1506ec36a83ce3f95577941108e423dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

SYMSRCS = $(wildcard *.s)
OBJS = $(SYMSRCS:.s=.o)
PROGS = $(SYMSRCS:.s=)
DEBUGFLAGS ?= -g

.SUFFIXES:

all: $(PROGS)

clean:
	rm -f $(OBJS) $(PROGS)

%.o: %.s $(wildcard include/*.s)
	as $(DEBUGFLAGS) $< -o $@

%: %.o
	ld $(DEBUGFLAGS) $@.o -o $@