-# TARGET defines the target platform architecture. It must match one of
-# the target platforms supported by the HAL. The default target is the
-# host machine architecture. You can override TARGET on the make command
-# line or in the environment. See hal/linux/*.inc for the list of
-# supported targets.
-ifeq (,$(wildcard $(HAL)/public/$(TARGET).inc))
-TARGETS=$(basename $(notdir $(wildcard $(HAL)/public/*.inc)))
-$(error TARGET $(TARGET) is invalid, valid targets are: $(TARGETS))
+ifndef ATH_DEBUG_SPINLOCKS
+export ATH_DEBUG_SPINLOCKS=0
+endif
+
+ifndef IEEE80211_DEBUG_REFCNT
+export IEEE80211_DEBUG_REFCNT=0
+endif
+
+ifndef HAL_DEBUG
+export HAL_DEBUG=0
+endif
+
+ifndef ATH_DEBUG
+export ATH_DEBUG=1
+endif
+
+ifeq ($(strip $(ATH_DEBUG_SPINLOCKS)),1)
+COPTS+= -DATH_DEBUG_SPINLOCKS=1
+endif
+
+ifeq ($(strip $(IEEE80211_DEBUG_REFCNT)),1)
+COPTS+= -DIEEE80211_DEBUG_REFCNT=1