Quote:
Originally Posted by JMJ_coder
It had two header files and three .cpp files.
|
I don't see those two header files listed as dependencies in your Makefile.
If you prefer the BSD make you can do something like this
Code:
# ------- See 'Make --- A Tutorial' by Adam de Boor (section 3.1)
# in /usr/share/doc/psd/12.make (OpenBSD)
OBJS = main.o draw.o collision.o
.SUFFIXES : .ccp .o
.ccp.o :
g++ -c ${.IMPSRC}
hack_slash : ${OBJS}
g++ ${OBJS} -o ${.TARGET} -lcurses
${OBJS} : joe.h plumber.h
CAVEAT: I am not a C programmer, just studied that execellent Make tutorial by Adam de Boor for some Makefiles to transform XML into HTML with XSLT style/transformation sheets