ixp/npe: Move conditional compilation to Makefile

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2009-01-30 09:45:23 +01:00
parent c1b7c70083
commit 1b017baf20
2 changed files with 6 additions and 10 deletions

View File

@ -29,7 +29,7 @@ LOCAL_CFLAGS += -I$(TOPDIR)/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB
CFLAGS += $(LOCAL_CFLAGS) CFLAGS += $(LOCAL_CFLAGS)
HOST_CFLAGS += $(LOCAL_CFLAGS) HOST_CFLAGS += $(LOCAL_CFLAGS)
COBJS := npe.o \ COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
miiphy.o \ miiphy.o \
IxOsalBufferMgt.o \ IxOsalBufferMgt.o \
IxOsalIoMem.o \ IxOsalIoMem.o \
@ -80,16 +80,16 @@ COBJS := npe.o \
IxNpeMhUnsolicitedCbMgr.o IxNpeMhUnsolicitedCbMgr.o
ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
COBJS += IxNpeMicrocode.o COBJS-$(CONFIG_IXP4XX_NPE) += IxNpeMicrocode.o
endif endif
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) OBJS := $(addprefix $(obj),$(COBJS-y))
START := $(addprefix $(obj),$(START)) SOBJS := $(addprefix $(obj),$(SOBJS))
all: $(LIB) all: $(LIB)
$(LIB): $(OBJS) $(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS)
######################################################################### #########################################################################

View File

@ -44,8 +44,6 @@
#include <npe.h> #include <npe.h>
#ifdef CONFIG_IXP4XX_NPE
static IxQMgrDispatcherFuncPtr qDispatcherFunc = NULL; static IxQMgrDispatcherFuncPtr qDispatcherFunc = NULL;
static int npe_exists[NPE_NUM_PORTS]; static int npe_exists[NPE_NUM_PORTS];
static int npe_used[NPE_NUM_PORTS]; static int npe_used[NPE_NUM_PORTS];
@ -690,5 +688,3 @@ int npe_initialize(bd_t * bis)
return 1; return 1;
} }
#endif /* CONFIG_IXP4XX_NPE */