mc1322x: change how board.h works to allow default board.h (defaults

to econotag)
This commit is contained in:
Mariano Alvira 2012-02-10 11:01:59 -05:00
parent ee8f2c669e
commit 43062b6d74
3 changed files with 10 additions and 22 deletions

View file

@ -74,9 +74,9 @@ CFLAGS += -I$(OBJECTDIR) -I$(CONTIKI_CPU)/board -DBOARD=$(TARGET)
$(OBJECTDIR)/board.h: $(OBJECTDIR)
ifneq (,$(findstring Windows,$(OS)))
${info Cygwin detected.}
ln -f $(CONTIKI_CPU)/board/$(TARGET).h $(OBJECTDIR)/board.h
ln -f $(CONTIKI_CPU)/board/board.h $(OBJECTDIR)/board.h
else
ln -sf ../$(CONTIKI_CPU)/board/$(TARGET).h $(OBJECTDIR)/board.h
ln -sf ../$(CONTIKI_CPU)/board/board.h $(OBJECTDIR)/board.h
endif

View file

@ -1,20 +0,0 @@
# -*- makefile -*-
BOARDS := redbee-dev redbee-r1 redbee-usb redbee-econotag quahogcon freescale-ncb
OBJDIR := obj_$(BOARD)_board
CFLAGS += -I$(OBJDIR) -I$(MC1322X)/board -DBOARD=$(BOARD)
$(OBJDIR):
ifndef BOARD
${warning BOARD not defined}
${warning echo "make BOARD=foo"}
${warning "boards: $(BOARDS)"}
${error you must define BOARD}
endif
@echo "setup object directory for dev board"
mkdir $(OBJDIR)
$(OBJDIR)/board.h: $(OBJDIR)
ln -sf ../$(MC1322X)/board/$(BOARD).h $(OBJDIR)/board.h

View file

@ -0,0 +1,8 @@
#ifndef BOARD
BOARD = redbee-econotag
#endif
#if BOARD == redbee-econotag
#include "redbee-econotag.h"
#endif