
GPLLIBDIR = $(PRXXDIR)/local/gpllib

SUBDIRS-HAVECAN-y = canfestival
SUBDIRS-HAVESQL-y = sqlite

LIB-SUBDIRS-cobra = $(SUBDIRS-HAVECAN-$(HAVECAN)) $(SUBDIRS-HAVESQL-$(HAVESQL))
LIB-SUBDIRS-labpro = $(SUBDIRS-HAVECAN-$(HAVECAN)) $(SUBDIRS-HAVESQL-$(HAVESQL))

SUBDIRS = $(LIB-SUBDIRS-$(HW))

all : $(SUBDIRS)

$(SUBDIRS): FORCE
	$(CONFIG_$@) $(MAKE) -C $@ $(MAKEDEFS) all


#------------------------------------------------------------
# clean cleans every subdir in src with a Makefile,
# independent of SUBDIRS
#------------------------------------------------------------
CLEANDIRS=$(addprefix clean-,$(dir $(wildcard */Makefile)))
# dependent of SUBDIRS
# CLEANDIRS=$(addprefix clean-,$(SUBDIRS))

clean: $(CLEANDIRS)
	rm -f *.a *.lst

$(CLEANDIRS) : FORCE
	$(MAKE) -C $(subst clean-,,$@) $(MAKEDEFS) clean

#------------------------------------------------------------
# install installs every subdir in src with a Makefile,
# independent of SUBDIRS
#------------------------------------------------------------
# INSTALLDIRS=$(addprefix INSTALL-,$(dir $(wildcard */Makefile)))
# dependent of SUBDIRS
INSTALLDIRS=$(addprefix INSTALL-,$(SUBDIRS))

install: $(INSTALLDIRS)

$(INSTALLDIRS) : FORCE
	$(MAKE) -C $(subst INSTALL-,,$@) $(MAKEDEFS) install

#------------------------------------------------------------
# uninstall uninstalls every subdir in src with a Makefile,
# independent of SUBDIRS
#------------------------------------------------------------
UNINSTALLDIRS=$(addprefix UNINSTALL-,$(dir $(wildcard */Makefile)))
# dependent of SUBDIRS
# UNINSTALLDIRS=$(addprefix UNINSTALL-,$(SUBDIRS))

uninstall: $(UNINSTALLDIRS)

$(UNINSTALLDIRS) : FORCE
	$(MAKE) -C $(subst UNINSTALL-,,$@) $(MAKEDEFS) install


FORCE :
