targets=demonstrate-segments-1.exe demonstrate-segments-2.exe ld_args=-m elf_i386 yasm_args=-f elf32 ld_dbg=-g -static yasm_dbg=-g dwarf2 all: $(targets) %.o : %.asm yasm $(yasm_args) $(yasm_dbg) -o $@ $*.asm %.exe : %.o ld $(ld_args) $(ld_dbg) -e start -o $@ $^