首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

[求助]高手救命!!如何修改如下makefile?

[求助]高手救命!!如何修改如下makefile?

请教高手!

在nios2上加载uclinux,现在想要应用一个hello_world的简单程序,如下:

#include <stdio.h>
main()
{
printf("hello world!\n");
}

请问该如何修改下面nios2自带的makefile啊?非常感谢!!!!!

#
# configurable options
#  - set DEBUG = 1 to turn on debugging support
#
DEBUG = 1
PROJ_NAME = hello
INSTALL_DIR =
PROGS := $(PROJ_NAME).exe
CFLAGS +=
#
# You should not need to modify anything beyond this point
#
TOPDIR = ..
include $(TOPDIR)/Rules.mak
ifeq '$(DEBUG)' '1'
PROGS += $(PROGS:.exe=.gdb)
endif
all: $(PROGS)
.PHONY: clean
clean:
-rm -f *.[oad] *.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

版主,看不到图片~~

我用的是niosIDE里面自带的makefile

好的,下载学习~~

谢谢版主的建议,由于毕业设计需要用到这方面知识,没有足够时间学习linux,

所以想着在NIOS IDE环境下可能会简单一点吧……

不过还是很多都不懂

返回列表