Messages in this thread Patch in this message | | | Subject | Re: [PATCH 2/3] firmware: Add CONFIG_BUILTIN_FIRMWARE option | From | David Woodhouse <> | Date | Sat, 24 May 2008 16:34:05 +0100 |
| |
On Sat, 2008-05-24 at 16:25 +0100, David Woodhouse wrote: > Playing with it now. I fixed the mkdir thing by including $(objtree) > in the target.
Here's what I have (on top of the git tree) now. I just need to sort out the clean/mrproper behaviour -- and possibly should rename the korg firmware to firmware/korg/k1212.c_shipped?
commit 728aa4212690701823ce3dcf22816f3953923530 Author: David Woodhouse <dwmw2@infradead.org> Date: Sat May 24 11:56:32 2008 +0100
firmware: move firmware files into firmware/
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/firmware/Makefile b/firmware/Makefile index f6b0c3c..62c2825 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -2,10 +2,15 @@ # kbuild file for firmware/ # +firmware-$(CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL) += korg/k1212 + firmware_bins := $(subst ",,$(CONFIG_BUILTIN_FIRMWARE)) -firmware_objs := $(patsubst %,%.o, $(firmware_bins)) -firmware_srcs := $(patsubst %,$(obj)/%.c, $(firmware_bins)) +firmware_srcs_generated := $(patsubst %,$(obj)/%.c, $(firmware_bins)) +firmware_objs := $(patsubst %,%.o, $(firmware_bins) $(firmware-y)) +firmware_dirs := $(patsubst %,$(objtree)/$(obj)/%,$(dir $(firmware_objs))) +quiet_cmd_mkdir = MKDIR $@ + cmd_mkdir = mkdir -p $@ quiet_cmd_fwbin = MK_FW $@ cmd_fwbin = echo '/* File automatically generated */' > $@ ; \ @@ -16,9 +21,14 @@ quiet_cmd_fwbin = MK_FW $@ echo '};' >> $@ ; \ echo 'DECLARE_BUILTIN_FIRMWARE("$(patsubst firmware/%.c,%,$@)",fw);' >> $@ -$(firmware_srcs): $(obj)/%.c: $(srctree)/$(obj)/% +$(firmware_srcs_generated): $(obj)/%.c: $(srctree)/$(obj)/% $(call cmd,fwbin) +$(firmware_dirs): + $(call cmd,mkdir) + +$(patsubst %,$(obj)/%,$(firmware_objs)): $(firmware_dirs) + obj-y := $(firmware_objs) -targets := $(firmware_objs) +targets := $(firmware_objs) $(patsubst $(obj)/%,%, $(firmware_srcs_generated)) diff --git a/sound/pci/korg1212/korg1212-firmware.c b/firmware/korg/k1212.c similarity index 100% rename from sound/pci/korg1212/korg1212-firmware.c rename to firmware/korg/k1212.c diff --git a/sound/pci/korg1212/Makefile b/sound/pci/korg1212/Makefile index 7a5ebdf..f11ce1b 100644 --- a/sound/pci/korg1212/Makefile +++ b/sound/pci/korg1212/Makefile @@ -7,4 +7,3 @@ snd-korg1212-objs := korg1212.o # Toplevel Module Dependency obj-$(CONFIG_SND_KORG1212) += snd-korg1212.o -obj-$(CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL) += korg1212-firmware.o
-- dwmw2
| |