login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
14
Re: Per option CFLAGS?
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Rene Herman <rene.herman@...>
To: H. Peter Anvin <hpa@...>
Cc: Kai Germaschewski <kai@...>, Sam Ravnborg <sam@...>, Linux Kernel <linux-kernel@...>, ALSA devel <alsa-devel@...>
Subject:
Re: Per option CFLAGS?
Date: Friday, September 14, 2007 - 7:30 pm
On 09/15/2007 01:13 AM, H. Peter Anvin wrote:
quoted text
> Rene Herman wrote:
quoted text
>> I have a single file foo.c that I want to generate two (ALSA) modules >> from, snd-foo2000.ko and snd-foo2001.ko, by compiling with either >> FOO2000 or FOO2001 defined. >> >> I can do this, and ALSA does this a few times, by providing dummy >> foo2000.c and foo2001.c files, like: >> >> === foo2000.c >> #define FOO2000 >> #include "foo.c" >> === >> >> and a regular Makefile >> >> === >> foo2000-objs := foo2000.o >> foo2001-objs := foo2001.o >> >> obj-$(CONFIG_SND_FOO2000) += snd-foo2000.o >> obj-$(CONFIG_SND_F002001) += snd-foo2001.o >> === >> >> That #include is a little lame though. Is there a nicer way? I noticed >> the per-file CFLAGS, but given that it's one source file for both, that >> doesn't fit. >> > > The stub source file is usually considered a good way to do this.
Mmm. If I'll have to live with it, I can, but thought I'd ask if there was some nice build trickery available instead. Rene. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Per option CFLAGS?
, Rene Herman
, (Fri Sep 14, 7:07 pm)
Re: Per option CFLAGS?
, H. Peter Anvin
, (Fri Sep 14, 7:13 pm)
Re: Per option CFLAGS?
, Rene Herman
, (Fri Sep 14, 7:30 pm)
Re: Per option CFLAGS?
, Adrian Bunk
, (Sat Sep 15, 4:47 am)
Re: Per option CFLAGS?
, Rene Herman
, (Sat Sep 15, 11:17 am)
Re: Per option CFLAGS?
, Denys Vlasenko
, (Sat Sep 15, 11:53 am)
Re: Per option CFLAGS?
, Rene Herman
, (Sat Sep 15, 11:59 am)
Re: Per option CFLAGS?
, Adrian Bunk
, (Sat Sep 15, 11:52 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mariusz Kozlowski
[PATCH 01] kmalloc + memset conversion co kzalloc
Rafael J. Wysocki
[Bug #10629] 2.6.26-rc1-$sha1: RIP __d_lookup+0x8c/0x160
Vladislav Bolkhovitin
Re: Integration of SCST in the mainstream Linux kernel
Jeff Garzik
Re: [RFC] Heads up on sys_fallocate()
git-commits-head
:
git
:
linux-netdev
:
Linus Torvalds
Re: [GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Andrew Morton
Re: [BUG] New Kernel Bugs
Colocation donated by:
Who's online
There are currently
2 users
and
904 guests
online.
Online users
strcmp
spiral1129
Syndicate