DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 25th November 2008
taylor_venable taylor_venable is offline
Real Name: Taylor Venable
Security Programmer
 
Join Date: Jun 2008
Location: Indiana, USA
Posts: 6
Default (Net|Open)BSD Make: implicit C header dependencies

Using BSD Make (specifically, I'm doing this on OpenBSD) I can use the wonderful incantation:

Code:
.SUFFIXES:	.o .cc

.cc.o:
	g++ -g -Wall -c ${.IMPSRC}
To compile C or C++ source to object files from corresponding source. But there's no dependency on the header files, which can obviously be somewhat important. Is there a quick and easy way to put the corresponding header file into this equation too?

I realize that normally alpha.h depends on beta.h and so forth, and that these special dependencies can be done the "normal" way with Make, so I am curious about the generic case that every .cc (C++ source) file depends on the .hh (C++ header) file of the same name.

Thanks for any tips.
__________________
How many shells could Shell sort sort if Shell sort could sort shells?
Reply With Quote
 

Tags
make

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot open cloning pty l2fl2f FreeBSD General 2 10th December 2008 07:30 PM
Apache: problem with rewritten content-type header Malakim General software and network 2 3rd December 2008 07:51 PM
How to handle conflicting port dependencies? Aux FreeBSD Ports and Packages 2 29th September 2008 06:44 AM
how to check package dependencies? bsdnewbie999 OpenBSD Packages and Ports 5 31st July 2008 04:05 AM
Missing header file(s) in source tree phatfish FreeBSD Installation and Upgrading 8 4th May 2008 08:40 PM


All times are GMT. The time now is 01:09 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick