default:  dynamic

LIBS=library

COMPONENTS=$(LOCALCOMPONENTS) 

APPS=$(LOCALAPPS) noncore/zstyle \
	noncore/zstyle/flat noncore/zstyle/fresh noncore/zstyle/liquid noncore/zstyle/theme \
	noncore/zstyle/libzstyle3 noncore/zstyle/libzstyle2

dynamic: $(APPS)

$(COMPONENTS): $(LIBS)

$(APPS): $(LIBS) $(COMPONENTS)

$(LIBS) $(COMPONENTS) $(APPS) single:
	$(MAKE) -C $@ -f Makefile

ipks:
	./mkipks noncore/zstyle/zstyle*.control

showcomponents:
	@echo $(LIBS) $(APPS) $(COMPONENTS) single

clean:
	$(MAKE) -C single -f Makefile $@
	for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done

lupdate:
	for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done

lrelease:
	for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done

dist:
	tar cvjf zstyle_src.tar.bz2 `cat noncore/zstyle/*.control | grep Files: | cut -c 8- | xargs echo` noncore/zstyle/ LICENSE Makefile mkipks

.PHONY: default dynamic $(LIBS) $(APPS) $(COMPONENTS) showcomponents clean ipks dist
