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 -lfontconfig #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 -lfontconfig endif ifeq ($(SDL), 2) LDFLAGS += -lSDL2 -lSDL_ttf ASFLAGS += -DSDL2=1 else LDFLAGS += -lSDL -lSDL_ttf ASFLAGS += -DSDL1=1 endif OBJ=$(TARGET).o SRC=$(TARGET).asm DEPS=sdl.asm yaglitch_op.asm yaglitch_ui.asm all: $(TARGET) $(TARGET): $(OBJ) ld $(LDFLAGS) $< -o $@ $(OBJ): $(SRC) $(DEPS) Makefile $(NASM) $(ASFLAGS) $< .PHONY: clean clean: -rm -fv $(TARGET) $(OBJ) $(TARGET).lst