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 #LDFLAGS=-s -melf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lSDL2 else ASFLAGS=-felf64 -g -F dwarf -l $(TARGET).lst #LDFLAGS=-g -melf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lSDL LDFLAGS=-g -melf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 endif ifeq ($(SDL), 2) LDFLAGS += -lSDL2 ASFLAGS += -DSDL2=1 else LDFLAGS += -lSDL ASFLAGS += -DSDL1=1 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