Thread: Makefiles
View Single Post
  #4   (View Single Post)  
Old 18th October 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Quote:
Originally Posted by JMJ_coder View Post
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
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote