小编Mos*_*she的帖子

"没有什么可以为makefile做的"消息

我有以下文件:

Child.c,Cookie.c,Cookie.h,CookieMonster.c,Jar.c,Jar.h,Milk.c,Milk.h

和下面的makefile,名为makePractice,它应该创建两个可执行文件,Child和CookieMonster.

makefile:

CC = gcc    # the compiler
CFLAGS = -Wall  # the compiler flags
ChildObjects = Jar.o    # object files for the Child executable
CookieMonsterObjects = Jar.o Milk.o     #object files for the CookieMonster executable

all: Child CookieMonster    # the first target. Both executables are created when 
                # 'make' is invoked with no target

# general rule for compiling a source and producing an object file
.c.o:
    $(CC) $(CFLAGS) -c $<

# linking rule for the Child executable …
Run Code Online (Sandbox Code Playgroud)

c makefile

13
推荐指数
2
解决办法
4万
查看次数

标签 统计

c ×1

makefile ×1