Cleanup for handling of empty environment variables.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3533 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mtaylor 2008-04-10 23:50:11 +00:00
parent dc1f1c8425
commit 0290dccff0
1 changed files with 18 additions and 16 deletions

View File

@ -174,33 +174,37 @@ export HAL_DEBUG=0
endif endif
ifndef ALQ ifndef ALQ
ALQ=0 export ALQ=0
endif
ifndef ATH_DEBUG
export ATH_DEBUG=0
endif endif
ifndef MMIOTRACE ifndef MMIOTRACE
MMIOTRACE=0 export MMIOTRACE=0
endif endif
ifneq ($(strip $(MMIOTRACE)),0) ifeq ($(strip $(MMIOTRACE)),1)
EXTRA_CFLAGS += -DMMIOTRACE=1 EXTRA_CFLAGS += -DMMIOTRACE=1
endif endif
ifneq ($(strip $(ATH_DEBUG_SPINLOCKS)),0) ifeq ($(strip $(ATH_DEBUG_SPINLOCKS)),1)
COPTS+= -DATH_DEBUG_SPINLOCKS=1 COPTS+= -DATH_DEBUG_SPINLOCKS=1
endif endif
ifneq ($(strip $(IEEE80211_DEBUG_REFCNT)),0) ifeq ($(strip $(IEEE80211_DEBUG_REFCNT)),1)
COPTS+= -DIEEE80211_DEBUG_REFCNT=1 COPTS+= -DIEEE80211_DEBUG_REFCNT=1
endif endif
# HAL_DEBUG enables HAL debugging code # HAL_DEBUG enables HAL debugging code
# At the moment this consists of wrappers around HAL functions so that # At the moment this consists of wrappers around HAL functions so that
# stack traces are more decipherable. # stack traces are more decipherable.
ifneq ($(strip $(HAL_DEBUG)),0) ifeq ($(strip $(HAL_DEBUG)),1)
COPTS+= -fno-inline -DAH_DEBUG=1 COPTS+= -fno-inline -DAH_DEBUG=1
endif endif
ifneq ($(strip $(ALQ)),0) ifeq ($(strip $(ALQ)),1)
obj-m += alq.o obj-m += alq.o
alq-objs := kern_alq.o alq-objs := kern_alq.o
EXTRA_CFLAGS += -DAH_DEBUG_ALQ -DAH_DEBUG EXTRA_CFLAGS += -DAH_DEBUG_ALQ -DAH_DEBUG
@ -224,26 +228,24 @@ NM := $(save_NM)
include $(TOP)/BuildCaps.inc include $(TOP)/BuildCaps.inc
# At present, these are defined all over the sources but it will not build without it ifeq ($(strip $(ATH_DEBUG)),1)
ifndef ATH_DEBUG CFLAGS += -DAR_DEBUG -DIEEE80211_DEBUG
export ATH_DEBUG=1
endif endif
ifneq ($(strip $(ATH_DEBUG)),0) ifeq ($(strip $(ATH_DEBUG_SPINLOCKS)),1)
CFLAGS += -DAR_DEBUG -DIEEE80211_DEBUG -DIEEE80211_DEBUG
endif
ifneq ($(strip $(ATH_DEBUG_SPINLOCKS)),0)
CFLAGS += -DATH_DEBUG_SPINLOCKS CFLAGS += -DATH_DEBUG_SPINLOCKS
endif endif
ifneq ($(strip $(IEEE80211_DEBUG_REFCNT)),0) ifeq ($(strip $(IEEE80211_DEBUG_REFCNT)),1)
CFLAGS += -DIEEE80211_DEBUG_REFCNT CFLAGS += -DIEEE80211_DEBUG_REFCNT
endif endif
# Ensure correct endianess # Ensure correct endianess
LDFLAGS += $(LDOPTS) LDFLAGS += $(LDOPTS)
# Be pedantic
CFLAGS += -Werror -Wall
# Filter out compiler options that are not supported by all compilers # Filter out compiler options that are not supported by all compilers
# and that are not needed to ensure compatible architecture and calling # and that are not needed to ensure compatible architecture and calling
# conventions. # conventions.