help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make .o withe the same rule for both C and C++ files (newbie question)


From: Stefan Karlsson
Subject: Make .o withe the same rule for both C and C++ files (newbie question)
Date: Wed, 05 Oct 2005 21:44:07 +0200
User-agent: Thunderbird 1.4 (Windows/20050908)

Hello all,

I want to use the same rule for compiling both C and C++ files. Since I have a compiler with some peculiarities I cannot get away with just changing some variables and rely on the default rules.

Basically, instead of writing

 %.o: %.c
     <the-rule>

 %.o: %.cpp
     <the-rule>

I want to write something like

 %.o: %.c
 %.o: %.cpp
     <the-rule>


Is this possible? I'm a newbie, so please forgive me if this question is ultra-stupid.

--
Stefan Karlsson | address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]