[转载] My makefile can not work, why?# Unix - 噫吁兮,危乎高哉
o*e
1 楼
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: oldbare (bearhill), 信区: Programming
标 题: My makefile can not work, why?
发信站: The unknown SPACE (Sun Apr 7 15:15:57 2002) WWW-POST
Here is my make file:
# makefile for phase 1
CC = gcc
CFLAGS = -g
OBJS = TestLexan.o lexan.o
TestLexan.o : TestLexan.c gloabls.h
$(CC) $(CFLAGS) -c TestLexan.c
lexan.o : lexan.c lexan.h gloabls.h
$(CC) $(CFLAGS) -c lexan.c
TestL.exe: $(OBJS)
$(CC) $(CFLAGS) -eTestL $(OBJS)
After running it, there is the message:
bash: ./makefile
发信人: oldbare (bearhill), 信区: Programming
标 题: My makefile can not work, why?
发信站: The unknown SPACE (Sun Apr 7 15:15:57 2002) WWW-POST
Here is my make file:
# makefile for phase 1
CC = gcc
CFLAGS = -g
OBJS = TestLexan.o lexan.o
TestLexan.o : TestLexan.c gloabls.h
$(CC) $(CFLAGS) -c TestLexan.c
lexan.o : lexan.c lexan.h gloabls.h
$(CC) $(CFLAGS) -c lexan.c
TestL.exe: $(OBJS)
$(CC) $(CFLAGS) -eTestL $(OBJS)
After running it, there is the message:
bash: ./makefile