- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to run hello.c as per the tutorial in the linux reference guide. However, I get the following errors when i build the project (in the Nios IDE - Im using Nios2 eval kit 1.1) :Description Resource In Folder Location
*** No rule to make target `../Rules.mak'. hello_world
*** No rule to make target `hello.exe', needed by `all'. hello_world
../Rules.mak: No such file or directory Makefile hello_world line 3
I used the same makefile given in the folder with the hello.c program and did not edit the Rules.mak The code for the rules.mak: TOPDIR = ..
include $(TOPDIR)/Rules.mak
# # configurable options# - set DEBUG = 1 to turn on debugging support#
DEBUG = 0
PROJ_NAME = hello
INSTALL_DIR =
PROGS := $(PROJ_NAME).exe
CFLAGS +=
# # You should not need to modify anything beyond this point#
ifeq '$(DEBUG)' '1'
CFLAGS += -O0 -g
PROGS += $(PROGS:.exe=.gdb)
endif
all: $(PROGS)
.PHONY: clean
clean:
-rm -f *. *.elf *.gdb *.bin *.exe
.PHONY: install
install: all
ifeq "$(INSTALL_DIR)" ""
$(error No installation directory specified)
endif
mkdir -p $(INSTALL_DIR)/bin
install -v $(filter %.exe, $(PROGS)) $(INSTALL_DIR)/bin
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- I used the same makefile given in the folder with the hello.c program and did not edit the Rules.mak The code for the rules.mak:[/b] --- Quote End --- I think that you meant Makefile because this is the code of the makefile. I think that the problem is : <div class='quotetop'>QUOTE </div> --- Quote Start --- TOPDIR = ..[/b] --- Quote End --- That means that the path of your Rules.mak file is one directory above the project's directory. If the Rules.mak and Makefile are in the same directory then you must change the TOPDIR to :TOPDIR = ./
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you are right. It worked after changing it.
Thanks for the help.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page