Source

nerdy-nights / common.mk

Full commit
Dave Dribin 12d1e62 
Dave Dribin e3d4396 

Dave Dribin 12d1e62 
Dave Dribin e3d4396 

Dave Dribin 12d1e62 


Dave Dribin 7943ca0 
Dave Dribin e3d4396 
Dave Dribin 7943ca0 
Dave Dribin 12d1e62 

Dave Dribin e3d4396 
Dave Dribin 517e63e 
Dave Dribin 12d1e62 

Dave Dribin 7943ca0 


Dave Dribin 12d1e62 
Dave Dribin e3d4396 
Dave Dribin 7943ca0 
Dave Dribin 8bcb911 


Dave Dribin 7943ca0 
Dave Dribin e3d4396 
Dave Dribin 7943ca0 
Dave Dribin 12d1e62 
ifdef CONFIG_FILE
LDCONFIG_FLAGS = --config $(CONFIG_FILE)
CLCONFIG_FLAGS = -t nes --config $(CONFIG_FILE)
else
LDCONFIG_FLAGS = -t nes
CLCONFIG_FLAGS = -t nes
endif


AS	= ca65
ASFLAGS	= -l -t nes
LD	= ld65
LDFLAGS	= -m $(PROGRAM).map $(CONFIG_FLAGS)
CL	= cl65
CLFLAGS	= -l -t nes -g $(CLCONFIG_FLAGS) -m $(PROGRAM).map -Ln $(PROGRAM).lbl


OBJECTS = $(SOURCES:.asm=.o)

all: $(PROGRAM).nes

$(PROGRAM).nes:
	$(CL) $(CLFLAGS) -o $@ $(SOURCES)

open: $(PROGRAM).nes
	open $(PROGRAM).nes

clean:
	$(RM) *.o *.lst $(PROGRAM).nes $(PROGRAM).map $(PROGRAM).lbl

.PHONY: all clean open $(PROGRAM).nes