X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=Makefile.inc;h=0b2197d440de4de59b289bfd6f099c04d9cb3659;hb=a78d83bb0d268e1bdbd7b4791a16c9b0aafed37e;hp=4dadc3ef131d02570d91cbf43ff502a443098942;hpb=18178f002d38e72391ec95b18e11f6e595c3f30f;p=madwifi%2F.git diff --git a/Makefile.inc b/Makefile.inc index 4dadc3e..0b2197d 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -161,12 +161,49 @@ TARGETS=$(basename $(notdir $(wildcard $(HAL)/public/*.inc))) $(error TARGET $(TARGET) is invalid, valid targets are: $(TARGETS)) endif +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 ALQ +ALQ=0 +endif + +ifndef MMIOTRACE +MMIOTRACE=0 +endif + +ifneq ($(strip $(MMIOTRACE)),0) +EXTRA_CFLAGS += -DMMIOTRACE=1 +endif + +ifneq ($(strip $(ATH_DEBUG_SPINLOCKS)),0) +COPTS+= -DATH_DEBUG_SPINLOCKS=1 +endif + +ifneq ($(strip $(IEEE80211_DEBUG_REFCNT)),0) +COPTS+= -DIEEE80211_DEBUG_REFCNT=1 +endif + # HAL_DEBUG enables HAL debugging code # At the moment this consists of wrappers around HAL functions so that # stack traces are more decipherable. +ifneq ($(strip $(HAL_DEBUG)),0) +COPTS+= -fno-inline -DAH_DEBUG=1 +endif -ifdef HAL_DEBUG -COPTS+= -fno-inline +ifneq ($(strip $(ALQ)),0) +obj-m += alq.o +alq-objs := kern_alq.o +EXTRA_CFLAGS += -DAH_DEBUG_ALQ -DAH_DEBUG endif # Don't let HAL mess with the toolchain - save toolchain variables @@ -187,6 +224,23 @@ NM := $(save_NM) include $(TOP)/BuildCaps.inc +# At present, these are defined all over the sources but it will not build without it +ifndef ATH_DEBUG +export ATH_DEBUG=1 +endif + +ifneq ($(strip $(ATH_DEBUG)),0) +CFLAGS += -DAR_DEBUG -DIEEE80211_DEBUG -DIEEE80211_DEBUG +endif + +ifneq ($(strip $(ATH_DEBUG_SPINLOCKS)),0) +CFLAGS += -DATH_DEBUG_SPINLOCKS +endif + +ifneq ($(strip $(IEEE80211_DEBUG_REFCNT)),0) +CFLAGS += -DIEEE80211_DEBUG_REFCNT +endif + # Ensure correct endianess LDFLAGS += $(LDOPTS)