本人初学makefile,在练习过程遇到错误特来请教。 在/temp/c001的文件夹中有如下文件: 1、main.c #include "stdio.h" int main(){printf("hello,world!\n");} 2、makefile hello:main.c gcc -c mainc -o hello 在执行$make命令后显示错误信息:missing separator. 请问如何修改makefile文件?非常感谢。 本人的email:sxz88888@sohu.com
by sxz88888 - C/C++ - 2003-08-18 19:03:45 阅读(1531) 回复(1)
189 $(RECURSIVE_TARGETS): 190 @set fnord $$MAKEFLAGS; amf=$$2; \ 191 dot_seen=no; \ 192 target=`echo $@ | sed s/-recursive//`; \ 193 list='$(SUBDIRS)'; for subdir in $$list; do \ 194 echo "Making $$target in $$subdir"; \ 195 if test "$$subdir" = "."; then \ 196 dot_seen=yes; \ 197 local_targ...
大家好,我是个高中生,高中1年纪。
最近在学习linux下的编程。
// 文件main.c
#include
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 /...