From d1e063beb43e595680c65e3804d1f8ddff53373b Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Sat, 18 Nov 2006 23:48:07 +0100 Subject: Imported Debian version 0.3.8.8 --- Makefile | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c880d5 --- /dev/null +++ b/Makefile @@ -0,0 +1,94 @@ +# +# Copyright 1999 Silicon Graphics, Inc. +# Copyright 2002-2004 Guido Guenther +# Copyright (C) 2004 by Thiemo Seufer +# + +# default subarch +SUBARCH ?= IP22 + +# these contain subarch independent files +SUBARCH_INDEP_DIRS= \ + arclib \ + tip22 + +# these contain subarch dependent files +SUBARCH_DIRS= \ + common \ + ext2load + +define indep-tgt +$(foreach sd,$(SUBARCH_INDEP_DIRS),$(1)-subarch-indep-$(sd)) +endef + +define dep-tgt +$(foreach sd,$(SUBARCH_DIRS),$(1)-subarch-dep-$(sd)) +endef + +define build-indep-tgt +$(call indep-tgt,build) +endef + +define build-dep-tgt +$(call dep-tgt,build) +endef + +define install-indep-tgt +$(call indep-tgt,install) +endef + +define install-dep-tgt +$(call dep-tgt,install) +endef + +define clean-indep-tgt +$(call indep-tgt,clean) +endef + +define clean-dep-tgt +$(call dep-tgt,clean) +endef + +define submake +@$(MAKE) -C $(1) SUBARCH=$(SUBARCH) $(2) +endef + + +all: build + +build: build-subarch-indep build-subarch-dep +build-subarch-indep: $(build-indep-tgt) +build-subarch-dep: $(build-dep-tgt) + +$(build-indep-tgt): + $(call submake,$(patsubst build-subarch-indep-%,%,$@),all) + +$(build-dep-tgt): + $(call submake,$(patsubst build-subarch-dep-%,%,$@),all) + +install: install-subarch-indep install-subarch-dep +install-subarch-indep: $(install-indep-tgt) +install-subarch-dep: $(install-dep-tgt) + +$(install-indep-tgt): + $(call submake,$(patsubst install-subarch-indep-%,%,$@),install) + +$(install-dep-tgt): + $(call submake,$(patsubst install-subarch-dep-%,%,$@),install) + +clean: clean-subarch-indep clean-subarch-dep +clean-subarch-indep: $(clean-indep-tgt) +clean-subarch-dep: $(clean-dep-tgt) + +$(clean-indep-tgt): + $(call submake,$(patsubst clean-subarch-indep-%,%,$@),clean) + +$(clean-dep-tgt): + $(call submake,$(patsubst clean-subarch-dep-%,%,$@),clean) + + +.PHONY: all \ + build build-subarch-indep build-subarch-dep \ + $(build-indep-tgt) $(build-dep-tgt) \ + clean clean-subarch-indep clean-subarch-dep \ + $(clean-indep-tgt) $(clean-dep-tgt) -- cgit v1.2.3