ChinaUnix.net
相关文章推荐:

makefile 符号

下了一个开源的库里面有这么几行看不懂, 请高手赐教: libz.a: $(OBJS) $(OBJA) $(AR) $@ $(OBJS) $(OBJA) -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 ---就是这行看不懂是什么意思??? 另外这种问题如何自己找资料?我在google上找"-@"找不到啊。

by viscar - C/C++ - 2007-06-06 16:31:15 阅读(1144) 回复(2)

相关讨论

读别人写的makefile的时候有点困难,所以请教各位以下这些符号的含义: $():括号里边的是变量; 那么这两句话呢? %.so: %.c $(CC) -fPIC -shared -o $@ $< 第一句的意思是所由的.so文件都倚赖相应的.c文件. 第二句里的$@和$<分别是什么意思呢?

by akei48 - C/C++ - 2007-03-03 15:29:38 阅读(3920) 回复(3)

HPUX11i系统下,ansic编译器。 我的makefile文件里, $<, $*等符号为什么不能识别? ${CC} ${CFLAGS} ${IFLAGS} ${CMPNAME}.c 编译可以通过,但是用 ${CC} ${CFLAGS} ${IFLAGS} $< 编译就不行? 为什么?高手清指教!

by Jerrybuct - C/C++ - 2004-07-30 13:21:48 阅读(1417) 回复(4)

.SUFFIXES: .o .c .cpp .ec .a 1.请问.SUFFIXES 这个标记起什么作用,为什么要用这个标记,有什么用途? 2..ec 文件是什么文件,我还从来没见过,麻烦各位大哥帮小弟讲解下。

by xiehui888 - C/C++ - 2009-03-05 17:37:23 阅读(2526) 回复(5)

大家好,我是个高中生,高中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 阅读(2607) 回复(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 阅读(3906) 回复(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 阅读(2006) 回复(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 阅读(1117) 回复(1)

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

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

为什么要加上-I . -g -Wall -ansi呀? 用gcc -c main.c 不就好了吗? :em14:

by qiqixiao - Linux论坛 - 2004-10-08 15:03:12 阅读(568) 回复(1)

freemem:freemem.c cc freemem.c -o freemem

by deng_save_file - Linux论坛 - 2004-07-08 07:36:36 阅读(462) 回复(0)