Mail Archives: djgpp/1996/01/02/16:09:55
In article <951220223650_95924759 AT emout05 DOT mail DOT aol DOT com>, NMair AT aol DOT com says...
>
>Can someone out there in internet land send me a simple sample makefile.
>I have gmake from simtel but no example makefiles were included.
This type of makefile that I use seems to work OK for me. It handles all
the auto-dependencies fairly well. You'll need a copy of SED though (should
be one on Simtel).
# *Translator Definitions*
# -g for debug info, -Wall for all warning messages
CPPFLAGS = -g -Wall
CC = gcc
# *Implicit Rules*
%.o : %.cpp
$(CC) -c $(CPPFLAGS) $<
%.d : %.cpp
command /c $(CC) -MM $< | sed "s/$*.o/& $@/g" > $@
# *List Macros*
SOURCES = testcras.cpp crashsh.cpp
OBJS = testcras.o crashsh.o
EXEC = testcras
# *Explicit Rules*
testcras: $(OBJS)
$(CC) $(CPPFLAGS) -o $(EXEC) ${OBJS} -lgpp -lpc -lm
clean:
del *.o
include $(SOURCES:.cpp=.d)
--
Ed. Mueller The opinions expressed do not reflect my employer.
Ed DOT Mueller AT itg DOT ti DOT com
Texas Instruments Information Systems & Services Group
Plano, TX.
- Raw text -