%.o: %.asm
	fasm $^ $@

.PHONY: all clean
all: elfobj64 elfobj64_gcc

elfobj64_gcc: $(patsubst %.asm,%.o,$(wildcard *.asm))
	gcc -nostartfiles $^ -o $@
elfobj64: $(patsubst %.asm,%.o,$(wildcard *.asm))
	ld $^ -o $@

clean:
	rm elfobj64
	rm *.o
