mc1322x: change how board.h works to allow default board.h (defaults
to econotag)
This commit is contained in:
parent
ee8f2c669e
commit
43062b6d74
|
@ -74,9 +74,9 @@ CFLAGS += -I$(OBJECTDIR) -I$(CONTIKI_CPU)/board -DBOARD=$(TARGET)
|
||||||
$(OBJECTDIR)/board.h: $(OBJECTDIR)
|
$(OBJECTDIR)/board.h: $(OBJECTDIR)
|
||||||
ifneq (,$(findstring Windows,$(OS)))
|
ifneq (,$(findstring Windows,$(OS)))
|
||||||
${info Cygwin detected.}
|
${info Cygwin detected.}
|
||||||
ln -f $(CONTIKI_CPU)/board/$(TARGET).h $(OBJECTDIR)/board.h
|
ln -f $(CONTIKI_CPU)/board/board.h $(OBJECTDIR)/board.h
|
||||||
else
|
else
|
||||||
ln -sf ../$(CONTIKI_CPU)/board/$(TARGET).h $(OBJECTDIR)/board.h
|
ln -sf ../$(CONTIKI_CPU)/board/board.h $(OBJECTDIR)/board.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
8
cpu/mc1322x/board/board.h
Normal file
8
cpu/mc1322x/board/board.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef BOARD
|
||||||
|
BOARD = redbee-econotag
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BOARD == redbee-econotag
|
||||||
|
#include "redbee-econotag.h"
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue