# if current directory's name ends with 'v', ...
ifneq ($(subst v/,//,$(notdir $(shell pwd))/),$(notdir $(shell pwd))/)
    PACKAGES=
else
    vpath %.vhd $(NOODLYBOX_HOME)/model:../rtl:$(NOODLYBOX_HOME)/sample/model:$(NOODLYBOX_HOME)/sample/rtl
    vpath %.xaw ../rtl:$(NOODLYBOX_HOME)/sample/rtl
    SOURCES:=$(notdir $(wildcard $(NOODLYBOX_HOME)/model/*.vhd ../rtl/*.vhd) MAINDCM.vhd ACCESS_SM.vhd SAMPLEFPGA.vhd)
    PACKAGES=$(addprefix pkg/,$(SOURCES:.vhd=_PKG.vhd))
endif
