Can anyone give me a simple makefile template! ! ! [email protected]

Category: Linux/Unix Community -> Applications Author: alwayway Date: 2001-07-08 16:15:30
 
alwayway
2001-07-08 16:15:30
haha: haha.c
gcc haha.c-o haha ​​
nrgmlw
2001-07-08 16:32:17
TARGET1 = some1
TARGET2 = some2

all: $ (TARGET1) $ (TARGET2)

$ (TARGET1): some1.o
; gcc-o $ (TARGET1) some1.o

some1.o: some1.c
gcc - c-g-Wall some1.c

TARGET2 ditto
all is to be able to output a plurality of executable files. To promote open, it is to achieve multiple purposes.
sirlove
2001-07-08 16:47:49
CC = gcc
INCLUDES = -I/usr/include /
LIBS = -L/usr/lib /
CPP = g+ +

all: hello
hello: hello.o student.o
; $ (CPP)-o hello hello.o student.o
hello.o: hello.cpp
$ (CPP)-c hello.cpp
student.o: student.cpp
$ (CPP) ;-c student.cpp
install:
cp. / hello $ (PREFIX)
uninstall:
rm-f $ (PREFIX) / hello
clean:
rm-f. / *. o
rm-f. / hello
rm-f. / core
wangqiang1098
2001-07-08 17:03:50

I use a cross-compiler, the compiler to use arch / ppc / down. h file, how included into