help-make
[Top][All Lists]
Advanced

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

similar rules


From: Torsten Mohr
Subject: similar rules
Date: Wed, 21 Jun 2006 21:51:31 +0200
User-agent: KMail/1.8

Hi,

some rules in my Makefiles are quite similar, but
not the same.  These rules i have to duplicate at
the moment, for example:

$(OBJ_C): $(D_OBJ)/%.o : %.c
        $(CC) $(G) $(OPTS) -o $@ -c $<

$(OBJ_CC): $(D_OBJ)/%.o : %.cc
        $(CXX) $(G) $(OPTS) -o $@ -c $<

$(OBJ_J): $(D_OBJ)/%.o : %.java
        $(GCJ) $(G) $(OPTS) -o $@ -c $<

$(OBJ_A): $(D_OBJ)/%.o : %.S
        $(AS) $(G) $(OPTS) -o $@ -mv850e -c $<

Is there a way to apply parameters to the rules
to write the basic rule behind this only once?


Thanks for any hints,
Torsten.




reply via email to

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