blob: d1a2c4698aa5f62618043bb4de7c8f63d3070ec6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
empty :=
out_dir := out
obj_dir := $(out_dir)/artifacts
src_files := $(wildcard *.tnsl)
obj_files := $(src_files:.tnsl=.o)
out_files := $(src_files:.tnsl=.out)
all: outdir $(out_files)
.PHONY: all test
%.asm: %.tnsl
../ctc $< $(obj_dir)/$@
%.o: %.asm
nasm -f elf64 -o $(obj_dir)/$@ $(obj_dir)/$<
%.out: %.o
gcc -o $(out_dir)/$@ $(obj_dir)/$<
outdir:
mkdir -p $(out_dir)
mkdir -p $(obj_dir)
clean:
rm -rf out/*
|