首页 技术 正文
技术 2022年11月14日
0 收藏 317 点赞 5,123 浏览 1721 个字
#g++ compiler: options# -std=c++0x enables ISO C++ 11 standard
# -I.. pulls in the Version_test.h file for conditional compilation
# of code the uses features that might not yet be implemented
CC = g++
CCFLAGS = -std=c++0x -I..# Some programs include headers defined in earlier chapters
# LOCFLAGS used to set tell the compiler where to find a
# header that is not in the same directory as the source file itself
# LOCFLAGS will be set in directory level makefiles as needed
LOCFLAGS =### ####### To compile without using a makefile
# To compile an object file from a source file you could execute
# g++ -std=c++0x -c filename.cc # produces filename.obj
# To compile an executable file from an object file, you would execute
# g++ -std=c++0x filename.o # produces filename.exe
# To compile an executable file from a source file, you would execute
# g++ -std=c++0x filename.cc # produces filename.exe
######## each subdirectory contains a Makefile that lists the executable
# files that can be made in that directory. That list is assigned
# to the make macro named $OBJECTS
# This rule says that the make target named "all" depends on those
# files. Executing "make all" in a subdirectory will cause make
# to build each .exe file listed in that subdirectory's makefile
all: $(OBJECTS) # rule that says how to make a .o object file from a .cc source file
# for a given source file in a given directory you could compile it
# into an object file by executing "make filename.o"# $< and $@ are macros defined by make
# $< refers to the file being processed (i.e., compiled or linked)
# $@ refers to the generated file
%.o: %.cc
$(CC) $(CCFLAGS) $(LOCFLAGS) -c $< -o $@# rule that says how to make a .exe executable file from a .o object file
%.exe: %.o
$(CC) $(CCFLAGS) $(LOCFLAGS) $< -o $@# target to clean up the object files and any core files
# executing "make clean" in a subdirectory will remove all
# files named core or any file ending in .obj, or .stackdump
clean:
rm -rf *.o core *.stackdump# target to remove executable files as well as object and core files
clobber: clean
rm -rf *.exe
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,082
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,556
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,405
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,179
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,815
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,898