MODS :=		\
	f9_buttons	\
	f9_emotes	\
	f9_theme	\
	media_bbc	\
	yt_nocookie	\
	topic_mute	\
	dragdrop_attach

PKGDIR := $(PWD)/../packages

.PHONY: $(MODS) all

all: $(MODS)

$(MODS): $(PKGDIR)
	@echo '#'
	@echo '# Building $@'
	@echo '#'
	@make PKGDIR=$(PKGDIR) -C $@

$(PKGDIR):
	@mkdir $(PKGDIR)

CLEAN_MODS := $(patsubst %,clean_%,$(MODS))
.PHONY: clean $(CLEAN_MODS)
clean: $(CLEAN_MODS)

$(CLEAN_MODS):
	@make PKGDIR=$(PKGDIR) -C $(patsubst clean_%,%,$@) clean
