1.虽然能编译出程序,但是会提示错误。目前暂未解决
make: sinclude: Command not found
make: *** [test] Error 127
2. 后续主要要修改的部分:
1> PROGRAM := hello # 设置运行程序名
2> SRCDIRS := . # 源程序位于当前目录下
3> SRCEXTS := .c .cpp # 源程序文件有 .c 和 .cpp 两种类型
4> CFLAGS := -g # 为 c 目标程序包含 gdb 调试信息
5> CPPFLAGS := -g # 为 c++ 目标程序包含 gdb 调试信息
3. Makefile文件
#############################################################
# Generic Makefile for C/C++ Program
#
# License: GPL (General Public License)
# Author: whyglinux
# Date: 2006/03/04 (version 0.1)
# 2007/03/24 (version 0.2)
# 2007/04/09 (version 0.3)
# 2007/06/26 (version 0.4)
# 2008/04/05 (version 0.5)
#
# Description:
# ------------
# This is an easily customizable makefile template. The purpose is to
# provide an instant building environment for C/C++ programs.
#
# It searches all the C/C++ source files in the specified directories,
# makes dependencies, compiles and links to form an executable.
#
# Besides its default ability to build C/C++ programs which use only
# standard C/C++ libraries, you can customize the Makefile to build
# those using other libraries. Once done, without any changes you can
# then build programs using the same or less libraries, even if source
# files are renamed, added or removed. Therefore, it is particularly
# convenient to use it to build codes for experimental or study use.
#
# GNU make is expected to use the Makefile. Other versions of makes
# may or may not work.
#
# Usage:
# ------
# 1. Copy the Makefile to your program directory.
# 2. Customize in the "Customizable Section" only if necessary:
# * to use non-standard C/C++ libraries, set pre-processor or compiler
# options to and linker ones to
# (See Makefile.gtk+-2.0 for an example)
# * to search sources in more directories, set to
# * to specify your favorite program name, set to
# 3. Type make to start building your program.
#
# Make Target:
# ------------
# The Makefile provides the following targets to make:
# $ make compile and link
# $ make NODEP=yes compile and link without generating dependencies
# $ make objs compile only (no linking)</