From: Bdale Garbee Date: Mon, 18 Mar 2013 21:05:41 +0000 (-0600) Subject: update Makefile to process subdirs and have a clean target X-Git-Tag: telelco-v3.0~924 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=275dbc3c1b8cb19a9b4ab8d45c66afcb12624314;p=hw%2Faltusmetrum update Makefile to process subdirs and have a clean target --- diff --git a/packages/Makefile b/packages/Makefile index 55f374a..74ae8d0 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -1,5 +1,9 @@ .SUFFIXES: .5c .py .fp +DIRS= \ + pinheader \ + tyco + FOOTPRINTS= \ MS5607.fp \ uson-8.fp \ @@ -14,4 +18,20 @@ FOOTPRINTS= \ .py.fp: python $*.py > $@ -all: $(FOOTPRINTS) \ No newline at end of file +BUILDDIRS=$(DIRS:%=build-%) +CLEANDIRS=$(DIRS:%=clean-%) + +all: $(BUILDDIRS) $(FOOTPRINTS) +$(DIRS): $(BUILDDIRS) +$(BUILDDIRS): + $(MAKE) -C $(@:build-%=%) + +$(CLEANDIRS): + $(MAKE) -C $(@:clean-%=%) clean + +clean: $(CLEANDIRS) + rm -f $(FOOTPRINTS) + +.PHONY: subdirs $(DIRS) +.PHONY: subdirs $(BUILDDIRS) +.PHONY: subdirs $(CLEANDIRS)