大家好,我是个高中生,高中1年纪。
最近在学习linux下的编程。
// 文件main.c
#include
by 写自己的操作系 - C/C++ - 2009-07-27 17:15:17 阅读(2603) 回复(13)
test.h
#ifndef _TEST_H_
#define _TEST_H_
void print();
#endif
test.c
#include
这是我写的一个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...
本人明天就要交程序 但是突然发现要求要makefile 但我对这个根本不太了解 我有5个目录,as.tgs.client.kdc 和sever_v 每个目录下基本都有main.cpp和tea.hpp等文件 请问如何构造makefile? 应该是在主目录下构造一个makefile,然后在5个目录下分别构造5个makefile, 但是该怎么写了? 更大的问题是,我的程序是在LINUX下编译通过 但是放到SUN的UNIX下编译无法通过 如果是在Solaris上编译,因该把相应的头文件包含进去,如:“sys /...
请问在makefile中有多个分支时应该怎么写。 [quote] ifeq(a,b) ARG=arg1 arg2 else ifeq(a,c) ARG=arg1 arg3 endif endif 这样是可以的,如果有多个分支的情况下,如下所示就不可以了。应该怎样解决呢 ifeq(a,b) ifeq(a1, b1) ARG=arg1 arg2 endif ifeq(a1, b2) ARG=arg1 arg3 else ARG=arg2 arg3 endif ifeq(c1, x) ARG=arg1 arg2 arg3 else ...