Return-Path: Received: from mail-px0-f189.google.com ([209.85.216.189]:58560 "EHLO mail-px0-f189.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758318AbZJIDPq convert rfc822-to-8bit (ORCPT ); Thu, 8 Oct 2009 23:15:46 -0400 Received: by pxi27 with SMTP id 27so6209779pxi.22 for ; Thu, 08 Oct 2009 20:15:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 9 Oct 2009 08:45:09 +0530 Message-ID: Subject: kbuild generating prefix-foo.o from foo.c From: kartikeyan sadasivuni Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: linux-kbuild@vger.kernel.org hi, I have a kernel module Makefile requirement as follows (unavoidable) prefix-foo.o should be generated by foo.c using Kbuild Right now I am doing the following ===== $(obj-m:%.o=%)-objs += $(MORE_OBJS:%=prefix-%) $(obj)/prefix-%.o : $(src)/%.c               # prefix-foo.o from foo.c       $(CC) $(c_flags) -c -o $@ $<       #line3 ===== Is there is a better kernel builtin way to write line-3 without module Makefile having quiet_cmd_* and cmd_* stuff, some thing like $(obj)/prefix-%.o : $(src)/%.c      $(call cmd,prefix-$@)      #without quiet_cmd_*,cmd_* in module Makefile kartikeyan -- S.Kartikeyan