gcc make file demo

##
## sample makefile, written by Jeff Juliano for COMP 121L class on Sept 10
##
## The '#' character at the beginning of a line means that the line is a
## comment.  I use a double '##' to denote editorial comments,
## and a single '#' to mark "code" that I have temporarily commented out.
##
## a makefile should be in the same directory as your project.  It
## should be named either "Makefile" or "makefile".  The capitalize
## version is better, because make will use that one if both versions exist.


## the next 2 lines specify the compiler and the compiler switches
## the compiler switch -g tells the compiler to compile in a 
##     way that a debuGger will understand the program
## the -Wall switch turns on all warnings (you should ALWAYS do this)
## the -ffor-scope switch fixes a bug in the current version of g++
## if you don't use g++, get rid of -Wall and -ffor-scope
CXX = g++
CXXFLAGS = -g -Wall -ffor-scope

## create a variable containing the names of all the .C files
SRCS = array.C string.C string.array.C menu.C demo.C

## create a variable containing the names of all the .o files
## compute the value from SRCS
OBJS = $(SRCS:.C=.o)


######################### rules follow ##################################

## this will link all the files and call the executable "demo"
## Note: the link rule must be the first rule in the makefile
demo: $(OBJS)
	g++ -o $@ $(OBJS)


## the following is a list of dependencies
## NOTE: there are no compilation rules given, do the default will be used
array.o: array.C array.h
string.o: string.C string.h
string.array.o: string.array.C string.array.h array.h string.h
menu.o: menu.C menu.h
demo.o: demo.C string.array.h menu.h


## Default rule for compiling all .C files without an explicit rule
## You can override the default by simply providing an explicit one
## This is read "to go to a .o from a .C, do the following rule"
##
## as before, a -c flag is needed to tell it to compile and not link
## $< expands to the name of the first file to the right of the colon
## $@ expands to the name to the left of the colon
%.o : %.C
	$(CXX) $(CXXFLAGS) -c $< -o $@


## this rule will remove the executable and all the .o files
## note that there are no dependencies
clean:
	/bin/rm -f $(OBJS) demo
 
原文链接:http://www.unc.edu/~mserre/mfEx/mf3

                
### 回答1: Keil GCC Demo是一款基于Keil MDK开发环境的软件开发工具,它支持GCC编译器。GCC是GNU Compiler Collection的缩写,由自由软件基金会(GNU Project)开发。Keil GCC Demo结合了Keil MDK和GCC编译器的特点和优势。 Keil MDK是一套集成开发环境(IDE),用于嵌入式系统的开发。它提供了一系列强大的软件工具和组件,如编译器、调试器、仿真器和分析器等,帮助开发人员高效完成嵌入式系统的开发任务。 Keil GCC DemoGCC编译器集成进了Keil MDK环境中,使得开发人员可以在同一个界面下使用GCC进行代码编译。GCC是一款功能强大、稳定可靠的开源编译器,支持多种编程语言,如C、C++、Objective-C、Fortran和Ada等。它具有良好的移植性和兼容性,可以在多种硬件平台上使用。 通过Keil GCC Demo,开发人员可以享受到Keil MDK和GCC编译器的双重优势。Keil MDK提供了丰富的开发工具和资源,包括代码编辑、编译、调试、仿真和性能分析等功能,使得嵌入式系统的开发更加快速高效。而GCC编译器则提供了先进的优化技术和丰富的语言特性支持,使得生成的代码具有更高的效率和可靠性。 总而言之,Keil GCC Demo是一款强大的软件开发工具,集成了Keil MDK和GCC编译器的特点,帮助开发人员高效完成嵌入式系统的开发任务。 ### 回答2: Keil GCC Demo是一种基于GCC编译器和Keil开发环境的演示版本。Keil是一家专门提供嵌入式软件开发工具的公司,其开发环境集成了GCC编译器,用于嵌入式系统的开发。Keil GCC Demo是Keil公司推出的这一开发环境的演示版本,通常提供给用户了解和试用该软件的机会。 Keil GCC Demo具有以下特点: 1. 免费试用:Keil GCC Demo通常是免费提供给用户试用的,用户可以在一定的试用期间内体验该开发环境的功能和特性。 2. 基于GCC编译器:Keil GCC Demo使用GCC编译器作为其底层编译工具,GCC是一款开源的跨平台编译器,被广泛用于C和C++语言的编译。 3. 提供嵌入式开发功能:Keil GCC Demo主要面向嵌入式系统的开发,提供了一系列针对嵌入式系统的开发功能和工具,如代码编辑、编译、调试等。 4. 集成于Keil开发环境:Keil GCC Demo被集成于Keil的开发环境中,用户可以通过该环境进行软件编写、编译、调试和仿真等工作。 总之,Keil GCC Demo是一款基于GCC编译器和Keil开发环境的演示版本,用于提供给用户试用,并展示其嵌入式开发功能和特点。用户可以通过试用该版本来了解Keil的开发环境,并决定是否购买完整版以进行嵌入式软件开发。 ### 回答3: Keil 是一种开发工具软件,支持多种编程语言,其中包括 C 语言。而 GCC(GNU Compiler Collection) 是一个开源的编程工具集,可以用于编译多种编程语言,其中也包括 C 语言。 Keil GCC Demo 是指使用 Keil 和 GCC 进行开发的示例项目。这个示例项目可能是为了展示 Keil 和 GCC 的使用方法和功能,或者是为了帮助开发者快速上手这两个工具。 通常,一个 Keil GCC Demo 会包括代码文件、配置文件和工程文件等。开发者可以通过打开该工程文件,加载示例项目并进行编译、调试和运行等操作。通过 Keil 和 GCC 的组合,开发者可以在示例项目中编写 C 语言代码,并利用 Keil 软件的功能进行编辑、编译、调试以及生成可执行文件等。 Keil GCC Demo 可能是一些简单的小程序,也可能是一些复杂的项目。通过研究这些示例项目,开发者可以了解 Keil 和 GCC 的使用方法,并掌握如何在开发中使用这两个工具进行 C 语言的编程。 总而言之,Keil GCC Demo 是使用 Keil 和 GCC 进行开发的示例项目,可帮助开发者了解这两个工具的使用方法和功能,并帮助他们在 C 语言的开发中更加熟练和高效。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值