ChinaUnix.net
相关文章推荐:

makefile include

include将其他的makefile文件包含进来,使用一次make是否就可以将所有包含在里面的makefile全部编译?? 请各位大虾指点!

by free_boy - C/C++ - 2007-11-29 12:52:52 阅读(2968) 回复(2)

相关讨论

ifeq (.config,$(wildcard .config)) include .config all: subdirs romfs modules modules_install image else all: config_error endif 运行结果:运行的是all: subdirs romfs modules modules_install image ;echo $(wildcard .config)显示的是.config 问题 .config指的是什么,我在当前目录没找到 .config的文件,以及以config为后缀的文件 include 后加的不是文件名吗 .config是文件名吗,没...

by ehyyngp - C/C++ - 2007-12-02 09:15:17 阅读(1346) 回复(2)

本人的工程目录较多,而且源文件经常交叉include其他目录下的.h文件,想做一个可以自动查找目录的makefile,用了VPATH设置了.h文件的目录,没有用-I指令.h文件的目录,但是报错说:源程序(.cc文件)中的include的.h文件(.cc和.h不在一个目录中)找不到。 请问大侠们,难道必须用-I一个一个的制定目录吗?有没有类似VPATH的东东,使得源程序中include的文件可以自动找到,谢谢!

by rinai - C/C++ - 2007-01-26 17:12:10 阅读(2337) 回复(2)

有一个文件hello.c,它里面include "abc.c",太过分了,竟然包含一个C文件 goolge后还是不得要领, 求教高手如何写这样的makefile,谢谢

by zhongfangqing - C/C++ - 2006-12-28 07:50:51 阅读(1771) 回复(20)

#include的文件,如果我在程序中没用到其中的函数或宏, 编译时会编进去吗? 也就是最后的可执行文件会不会因为我包含了不必要的头文件而变大.

by lcd - C/C++ - 2003-12-15 19:25:27 阅读(598) 回复(5)

makefile(1) 1.2 何时分解你的项目 很明显,把任何东西都分解是不合理的。象“世界,你们好”这样的简单程序根本就不能分,因为实在也没什么可分的。把用于测试用的小程序分解也是没什么意思的。但一 般来说,当分解项目有助于布局、发展和易读性的时候,我都会采取它。在大多数的情 况下,这都是适用的。(所谓“世界,你们好”,既 'hello world' ,只是一个介绍 一种编程语言时惯用的范例程序,它会在屏幕上显示一行 'hello w...

by w1_xiao - SCO文档中心 - 2009-10-13 14:51:40 阅读(4875) 回复(0)

大家好,我是个高中生,高中1年纪。 最近在学习linux下的编程。 // 文件main.c #include #include "hello.h" int main() { str_printf("hello"); return 0; } // hello.h #ifndef HELLO_H_ #define HELLO_H_ void str_printf(const char *str); #endif // hello.c #include "hello.h" void str_printf(const char *str) { printf("hello.c:%s\n", str); } 请问makefile文件该怎么写?

by 写自己的操作系 - C/C++ - 2009-07-27 17:15:17 阅读(1891) 回复(13)

test.h #ifndef _TEST_H_ #define _TEST_H_ void print(); #endif test.c #include #include "test.h" void print() { printf("hello,world\n"); } main.c #include "test.h" int main() { print(); return 0; } makefile: mycpp: main.o test.o gcc -o mycpp main.o test.o main.o: main.c test.h gcc -c main.c test.o: test.c gcc -c test.c makefile...

by hr_it - C/C++ - 2008-09-17 00:10:10 阅读(2690) 回复(11)

这是我写的一个makefile VPATH=../lib:../include:../bin lib = ../lib/ bin = ../bin/ objects=bank.o adminlogin.o mainmenu.o execute.o deposit.o withdraw.o query.o \ write.o read.o listall.o cancelaccount.o establishaccount.o bank : $(objects) gcc $(objects) -o $(bin)bank bank.o : bank.c includeofbank.h includeofstruct.h gcc -c bank.c -o $(lib)bank.o mainmenu.o : mainmen...

by wangxiaoguang - C/C++ - 2008-08-06 12:52:02 阅读(1371) 回复(10)

本人明天就要交程序 但是突然发现要求要makefile 但我对这个根本不太了解 我有5个目录,as.tgs.client.kdc 和sever_v 每个目录下基本都有main.cpp和tea.hpp等文件 请问如何构造makefile? 应该是在主目录下构造一个makefile,然后在5个目录下分别构造5个makefile, 但是该怎么写了? 更大的问题是,我的程序是在LINUX下编译通过 但是放到SUN的UNIX下编译无法通过 如果是在Solaris上编译,因该把相应的头文件包含进去,如:“sys /...

by babobo - Shell - 2005-09-19 10:39:02 阅读(706) 回复(1)

下了个java1.4源代码包,怎样执行make,我的操作系统是SCO UNIX

by zxllxz - Java - 2005-09-04 15:19:38 阅读(477) 回复(0)