summaryrefslogtreecommitdiff
path: root/Makefile
blob: 324eeb0c63882ee37084db79c8dce8ff55530fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.PHONY: fmt

all: fmt test.out

write-elf: main.c write_elf.c registers.h instructions.h
	$(CC) -flto -Wall -pedantic -std=c99 -m64 -static-pie main.c -o write-elf

test.out: write-elf
	./write-elf

tiny: tiny.s
	nasm -f elf64 tiny.s

fmt: main.c write_elf.c registers.h instructions.h
	clang-format -i $^