summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-29 12:49:35 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-29 12:49:35 -0500
commit9900d74e899b7d2d73f3c616f57006751562d7f6 (patch)
tree63412375d91ef854c43a35886da7f3a078e05700
parentc220f779c3ac2d3de2525461da65f89f21b7f467 (diff)
clean up
-rw-r--r--Makefile36
1 files changed, 25 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 4cdcae6..d3a7889 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ GRUB_MKIMAGE = src/$(host_arch)/grub/grub-mkimage
GRUB_MKSTANDALONE = src/$(host_arch)/grub/grub-mkstandalone --grub-mkimage=$(GRUB_MKIMAGE) -d src/$(host_arch)/grub/grub-core/
CBFSTOOL = src/$(host_arch)/coreboot/util/cbfstool/cbfstool
-arches = i686 x86_64
+arches := $(sort $(host_arch) i686)
archs = $(arches)
boards = x60 t60 x60t macbook21
romtypes = txtmode vesafb
@@ -24,14 +24,23 @@ roms = $(foreach board,$(boards),\
$(foreach romtype,$(romtypes),\
$(board)_$(keymap)_$(romtype))))
-build: PHONY \
- $(foreach rom,$(roms),roms/$(rom).rom roms/$(rom)_with_seabios.rom) \
- src/$(host_arch)/flashrom/flashrom_normal \
- src/$(host_arch)/flashrom/flashrom_lenovobios_macronix \
- src/$(host_arch)/flashrom/flashrom_lenovobios_sst \
- src/$(host_arch)/bucts/bucts
+all: PHONY build
+
+build: PHONY roms tools # $(addprefix tools-,$(arches))
+roms: PHONY $(foreach rom,$(roms),roms/$(rom).rom roms/$(rom)_with_seabios.rom)
+
+tools: PHONY tools-$(host_arch)
+$(addprefix tools-,$(arches)): tools-%: PHONY \
+ src/%/bucts/bucts \
+ src/%/flashrom/flashrom_normal \
+ src/%/flashrom/flashrom_lenovobios_macronix \
+ src/%/flashrom/flashrom_lenovobios_sst \
+ src/%/coreboot/util/cbfstool/cbfstool \
+ src/%/coreboot/util/cbfstool/rmodtool \
+ src/%/coreboot/util/nvramtool/nvramtool
+# Multiglob magic
define _nl
@@ -44,22 +53,26 @@ multiglob = $(if $(strip $2),\
$(_nl)$(value rule_$1)$(_nl))
+# Normal make rules
configure: configure.ac
autoconf
-Makefile.d/keymap-list.mk: $(keymapdir)/original/ Makefile
+Makefile.d/keymap-list.mk: $(keymapdir)/original/
echo keymaps = $(notdir $(wildcard $</*)) > $@
-Makefile.d/modules-list.mk: Makefile.d/modules/ Makefile
+Makefile.d/modules-list.mk: Makefile.d/modules/
echo modules = $(patsubst %.mk,%,$(notdir $(wildcard $</*.mk))) > $@
resources/grub/font/dejavusansmono.pf2: src/$(host_arch)/dejavu/ttf/DejaVuSansMono.ttf $(firstword $(GRUB_MKFONT))
$(GRUB_MKFONT) -o $@ $<
-# % = $(keymap)
+# % = %(keymap)
$(keymapdir)/%.gkb: $(keymapdir)/original/% $(firstword $(GRUB_MKLAYOUT))
$(GRUB_MKLAYOUT) -o $@ < $<
+
+# Includes
+
-include Makefile.d/modules-list.mk # sets "modules=..."
include $(patsubst %,Makefile.d/modules/%.mk,$(modules))
include Makefile.d/modules.mk
@@ -75,5 +88,6 @@ include Makefile.d/build-release.mk
.DELETE_ON_ERROR:
-PHONY:
+.SECONDARY:
.PHONY: PHONY
+PHONY: