Hi all! 'Cause it's my first post.
I want to have file example.nes in cc65, but there is error during the compilation (making):
make: *** No rule to make target 'example.asm', needed by 'example.o'. Stop
I know that's somelike error in makefile and on other forums people suggest there is problem with the path of sourcefile or typos in the make.
It's the make file I try to use.
I want to have file example.nes in cc65, but there is error during the compilation (making):
make: *** No rule to make target 'example.asm', needed by 'example.o'. Stop
I know that's somelike error in makefile and on other forums people suggest there is problem with the path of sourcefile or typos in the make.
It's the make file I try to use.
Code:
# To build the NES ROM just type: make
# To run the NES ROM just type: make run
# Note: as with any make system, if any of the files have been updated they will
# be rebuilt along with any parts that are dependant on them
# Tools required. You should set these defines in your environment rather than update the makefile
# ie: Control Panel -> System -> Advanced -> Environment Variables -> (New) User Variable
# Three environment variables are required
#
ifndef CA65
CA65 = D:\cc65\bin\ca65.exe
endif
ifndef LD65
LD65 = D:\cc65\bin\ld65.exe
endif
ifndef EMU
EMU = D:\cc65\fceux-2.1.4-win32\fceux.exe
endif
# Change the MAIN from "example" to whatever your project is going to be called.
# This means you need a file called "example.asm" and a tiles file called #"example.chr"
MAIN = example
INTER = tmp
# intermediate files
OBJS = $(MAIN).o
HEADER = $(INTER)/header.hed
ALL_PRG = $(INTER)/bank0.prg $(INTER)/bank1.prg
ALL_CHR = resources/$(MAIN).chr
# the part that does the compiling, assembling, linking etc..
all: $(MAIN).nes
clean:
rm -f $(OBJS) $(HEADER_OBJS) $(BANK_OBJS) $(HEADER) $(MAIN).nes $(ALL_PRG)
rm -Rf $(INTER)
run: $(MAIN).nes
$(EMU) $(MAIN).nes
# For making the PRG (including header)
$(OBJS): %.o: %.asm
$(CA65) $(CFLAGS) $< -o $@
$(ALL_PRG): $(OBJS)
mkdir -p $(INTER)
$(LD65) $(OBJS) -C nes.ini
# For making the final iNES ROM
$(MAIN).nes: $(ALL_PRG) $(HEADER)
cat $(HEADER) $(ALL_PRG) $(ALL_CHR) > $(MAIN).nes
# To run the NES ROM just type: make run
# Note: as with any make system, if any of the files have been updated they will
# be rebuilt along with any parts that are dependant on them
# Tools required. You should set these defines in your environment rather than update the makefile
# ie: Control Panel -> System -> Advanced -> Environment Variables -> (New) User Variable
# Three environment variables are required
#
ifndef CA65
CA65 = D:\cc65\bin\ca65.exe
endif
ifndef LD65
LD65 = D:\cc65\bin\ld65.exe
endif
ifndef EMU
EMU = D:\cc65\fceux-2.1.4-win32\fceux.exe
endif
# Change the MAIN from "example" to whatever your project is going to be called.
# This means you need a file called "example.asm" and a tiles file called #"example.chr"
MAIN = example
INTER = tmp
# intermediate files
OBJS = $(MAIN).o
HEADER = $(INTER)/header.hed
ALL_PRG = $(INTER)/bank0.prg $(INTER)/bank1.prg
ALL_CHR = resources/$(MAIN).chr
# the part that does the compiling, assembling, linking etc..
all: $(MAIN).nes
clean:
rm -f $(OBJS) $(HEADER_OBJS) $(BANK_OBJS) $(HEADER) $(MAIN).nes $(ALL_PRG)
rm -Rf $(INTER)
run: $(MAIN).nes
$(EMU) $(MAIN).nes
# For making the PRG (including header)
$(OBJS): %.o: %.asm
$(CA65) $(CFLAGS) $< -o $@
$(ALL_PRG): $(OBJS)
mkdir -p $(INTER)
$(LD65) $(OBJS) -C nes.ini
# For making the final iNES ROM
$(MAIN).nes: $(ALL_PRG) $(HEADER)
cat $(HEADER) $(ALL_PRG) $(ALL_CHR) > $(MAIN).nes