CFLAGS = -Oi -I .
LDFLAGS =

# Project name extracted from the directory name
PROJ = nothing

# All sources needed for compilation
OBJ = $(PROJ).o delta.o biisi.o

$(PROJ).prg: $(OBJ)
	cl65 $(OBJ) $(LDFLAGS)
	exomizer sfx basic $(PROJ) -o $(PROJ).prg

%.o: %.c
	cl65 $(CFLAGS) -c $< -o $@

%.o: %.s
	cl65 -c $< -o $@

run: $(PROJ).prg
	x64 -autostart $(PROJ).prg

clean:
	-rm *.o $(PROJ) *.prg *~
