|
From: | Fabrice GIRARDOT |
Subject: | Re: When some files need special compilation flags, ... |
Date: | Wed, 09 Jul 2008 10:14:19 +0200 |
User-agent: | Thunderbird 2.0.0.12 (Windows/20080213) |
You may try this way : You can define variables which name is build with part of a source filename : SPECIAL_FLAG_file1.c = -DSOME_FLAG SPECIAL_FLAG_file2.c = -DOTHER_FLAG %.o: %.c $(CC) -c $< $(SPECIAL_FLAG_$(notdir $<)) -o $@ When a file does not need any special flag, then $(SPECIAL_FLAG_$<) would evaluate to an empty string. Regards, -- Fabrice GIRARDOT
[Prev in Thread] | Current Thread | [Next in Thread] |