summaryrefslogtreecommitdiff
path: root/Makefile
blob: 40d1efa94d49434d117821bc6639f897e6ec0d46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
TARGET := sanctuary
SRCS = sanctuary.s
FTHS = sanctuary.fs

all: $(TARGET)

$(TARGET): $(TARGET).o
	ld -N -static -o $@ $<

$(TARGET).o: $(SRCS) $(FTHS)
	nasm -g -F dwarf -f elf64 -o $@ $<

.PHONY: clean
clean:
	-rm -f $(TARGET) $(TARGET).o

.PHONY: test
test: $(TARGET)
	echo 'include test.fs bye' | ./$(TARGET)