我来我网
https://5come5.cn
 
您尚未 登录  注册 | 菠菜 | 软件站 | 音乐站 | 邮箱1 | 邮箱2 | 风格选择 | 更多 » 
 

autium



性别: 帅哥 状态: 该用户目前不在线
等级: 栋梁之材
发贴: 655
威望: 0
浮云: 1115
在线等级:
注册时间: 2006-10-16
最后登陆: 2009-02-24

5come5帮你背单词 [ kick /kik/ v. & n. 踢 ]


关于makefile

MAKEFILE源码:
######################################
#
# Generic makefile
#
# by George Foot
# email: george.foot@merton.ox.ac.uk
#
# Copyright (c) 1997 George Foot
# All rights reserved.
#
# No warranty, no liability;
# you use this at your own risk.
#
# You are free to modify and
# distribute this without giving
# credit to the original author.
#
######################################

### Customising
#
# Adjust the following if necessary; EXECUTABLE is the target
# executable's filename, and LIBS is a list of libraries to link in
# (e.g. alleg, stdcx, iostr, etc). You can override these on make's
# command line of course, if you prefer to do it that way.
#

EXECUTABLE := mushroom.exe
LIBS := alleg

# Now alter any implicit rules' variables if you like, e.g.:
#

CFLAGS := -g -Wall -O3 -m486
CXXFLAGS := $(CFLAGS)

# The next bit checks to see whether rm is in your djgpp bin
# directory; if not it uses del instead, but this can cause (harmless)
# `File not found' error messages. If you are not using DOS at all,
# set the variable to something which will unquestioningly remove
# files.
#

ifneq ($(wildcard $(DJDIR)/bin/rm.exe),)
RM-F := rm -f
else
RM-F := del
endif

# You shouldn't need to change anything below this point.
#


SOURCE := $(wildcard *.c) $(wildcard *.cc)
OBJS := $(patsubst %.c,%.o,$(patsubst %.cc,%.o,$(SOURCE)))
DEPS := $(patsubst %.o,%.d,$(OBJS))
MISSING_DEPS := $(filter-out $(wildcard $(DEPS)),$(DEPS))
MISSING_DEPS_SOURCES := $(wildcard $(patsubst %.d,%.c,$(MISSING_DEPS)) \
$(patsubst %.d,%.cc,$(MISSING_DEPS)))
CPPFLAGS += -MD

.PHONY : everything deps objs clean veryclean rebuild

everything : $(EXECUTABLE)

deps : $(DEPS)

objs : $(OBJS)

clean :
  @$(RM-F) *.o                      #makefile :71
  @$(RM-F) *.d

veryclean: clean
  @$(RM-F) $(EXECUTABLE)

rebuild: veryclean everything

ifneq ($(MISSING_DEPS),)
$(MISSING_DEPS) :
  @$(RM-F) $(patsubst %.d,%.o,$@)
endif

-include $(DEPS)

$(EXECUTABLE) : $(OBJS)
  gcc -o $(EXECUTABLE) $(OBJS) $(addprefix -l,$(LIBS))



  自己写了一个简单的程序,运行MAKE,出现这样的错误:
  Makefile:71: *** missing separator.  Stop.

  请问怎么解决?

内网有用AUTOMAKE/AUTOCONF/MAKEFILE的高手嘛?
顶端 Posted: 2007-08-15 16:49 | [楼 主]
autium



性别: 帅哥 状态: 该用户目前不在线
等级: 栋梁之材
发贴: 655
威望: 0
浮云: 1115
在线等级:
注册时间: 2006-10-16
最后登陆: 2009-02-24

5come5帮你背单词 [ renew /ri'nju:/ v. 继续,重新开始,使更新,更换 ]


没人,自己顶气
顶端 Posted: 2007-08-15 17:05 | [1 楼]
我来我网·5come5 Forum » Linux专区

Total 0.014994(s) query 8, Time now is:12-23 01:38, Gzip enabled
Powered by PHPWind v5.3, Localized by 5come5 Tech Team, 黔ICP备16009856号