DEBUG=0 TARGET=yaglitch NASM=nasm ifeq ($(DEBUG), 0) ASFLAGS=-felf64 LDFLAGS=-s -melf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lSDL else ASFLAGS=-felf64 -g -F dwarf -l $(TARGET).lst LDFLAGS=-g -melf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lSDL endif OBJ=$(TARGET).o SRC=$(TARGET).asm all: $(TARGET) $(TARGET): $(OBJ) ld $(LDFLAGS) $< -o $@ $(OBJ): $(SRC) sdl.asm Makefile $(NASM) $(ASFLAGS) $< .PHONY: clean clean: -rm -fv $(TARGET) $(OBJ) $(TARGET).lst