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)