# Truck Computer Dooom! # # Douglas Thrift # # $Id$ common := Common include $(common)/common.mk targets := $(common) Audacious DashInterface GPS Music SteeringWheelRemote all := $(patsubst %, all-%, $(targets)) clean := $(patsubst %, clean-%, $(targets)) .PHONY: all $(all) clean $(clean) all: $(all) define all-target all-$(1): $(call recurse,$(1)) endef $(foreach target,$(targets),$(eval $(call all-target,$(target)))) all-DashInterface: all-Common all-Audacious all-GPS all-Music all-Music: all-Common all-SteeringWheelRemote: all-Common all-Audacious clean: $(clean) define clean-target clean-$(1): $(call recurse,$(1),clean) endef $(foreach target,$(targets),$(eval $(call clean-target,$(target))))