Makefile error 127 and empty variable name

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
Batboyrocks900
Posts: 2
Joined: Mon Jul 27, 2020 8:27 am

Makefile error 127 and empty variable name

Post by Batboyrocks900 » Mon Jul 27, 2020 8:40 am

When Compiling it there are two errors

1. Makefile:36: *** empty variable name. Stop.

2. make: *** [Makefile:57: all] Error 127

this makefile is apart of a template in pvsneslib

Code: Select all

# path to snesdev root directory (for emulators, devkitsnes, PVSNESLIB)
export DEVKITSNES := D:\DeskTop\SNES\pvsneslib-master

# path to devkitsnes root directory for compiler
export DEVKIT65XX :=  D:\DeskTop\SNES\pvsneslib-master\devkitsnes

#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------

ifeq ($(strip $(DEVKIT65XX)),)
$(error "Please set DEVKIT65XX in your environment. export DEVKIT65XX=<path to>devkit65XX")
endif

include $(DEVKIT65XX)/snes_rules

#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET		:=	$(shell basename $(CURDIR))
SOURCES		:=	.

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS	+=	$(INCLUDE) 

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS	:=	$(PVSNESLIB)
 LIBOBJS +:=	
 
export OUTPUT	:=	$(CURDIR)/$(TARGET)
 
CFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
SFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.asm)))
 
#---------------------------------------------------------------------------------

export OFILES	:=	$(BINFILES:.bin=.obj) $(CFILES:.c=.obj) $(SFILES:.asm=.obj)
 
export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
					$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
					-I$(CURDIR)/$(BUILD)

GTITLE 		:= -ht"$(TARGET)"
 
.PHONY: bitmaps all
 
#---------------------------------------------------------------------------------
 all	:	bitmaps $(OUTPUT).sfc
	$(SNTOOLS) -hi! $(GTITLE) $(TARGET).sfc

clean:
	@echo clean ...
	@rm -f $(OFILES) $(TARGET).sfc  *.pic *.pal *.map


#---------------------------------------------------------------------------------
$(OUTPUT).sfc	: $(OFILES)

any help would be thanked

User avatar
dougeff
Posts: 2712
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Makefile error 127 and empty variable name

Post by dougeff » Mon Jul 27, 2020 10:22 am

Well, you have a dependency for bitmaps*, and it's declared as a phony, but there's no recipe for bitmaps. Did you delete that part?

*all : bitmaps $(OUTPUT).sfc

bitmaps is a dependency of all:


There's one here...
https://github.com/alekmaul/pvsneslib/b ... 1/Makefile

...

the other error, line 36 is this...
LIBOBJS +:=

Hmm. Not sure about that one.
nesdoug.com -- blog/tutorial on programming for the NES

Batboyrocks900
Posts: 2
Joined: Mon Jul 27, 2020 8:27 am

Re: Makefile error 127 and empty variable name

Post by Batboyrocks900 » Mon Jul 27, 2020 10:56 am

dougeff wrote:
Mon Jul 27, 2020 10:22 am
Well, you have a dependency for bitmaps*, and it's declared as a phony, but there's no recipe for bitmaps. Did you delete that part?

*all : bitmaps $(OUTPUT).sfc

bitmaps is a dependency of all:


There's one here...
https://github.com/alekmaul/pvsneslib/b ... 1/Makefile

...

the other error, line 36 is this...
LIBOBJS +:=

Hmm. Not sure about that one.
do you think I can just delete the LIBOBJS +:= or something

and this is a thing im following the https://github.com/alekmaul/pvsneslib/w ... er-Notepad to just get started and they said to open up the template in the pvsneslib/template folder and this is the makefile on all of these examples so idk

Post Reply