summaryrefslogtreecommitdiff
path: root/Makefile
blob: 7927d9c4da4858e12840cbd2d61e6812270fe9e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
asm_files := $(wildcard *.asm)
obj_files := $(patsubst %.asm,%.o,$(asm_files))
bin_file := asmnc

.PHONY: all clean remake

all: $(bin_file)

clean:
	rm -f $(obj_files) $(bin_file)

remake: clean all

%.o: %.asm
	nasm -f macho64 -w+all -o $@ $<

$(bin_file): $(obj_files)
	gcc $^ -o $@