mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 16:29:34 +00:00
board.h works now
This commit is contained in:
parent
3cc6896981
commit
59391d7529
@ -32,11 +32,23 @@ $(ISR): $(ISR:.o=.c)
|
||||
%_$(BOARD).elf: %.elf
|
||||
mv $< $@
|
||||
|
||||
%.elf: $(START) $(ISR) $(LIBMC1322X)/libmc1322x.a $(OBJDIR)/%.o $(LINKERSCRIPT) board
|
||||
%.elf: $(START) $(ISR) $(LIBMC1322X)/libmc1322x.a $(OBJDIR)/%.o $(LINKERSCRIPT)
|
||||
$(LD) $(LDFLAGS) $(AOBJS) \
|
||||
--start-group $(PLATFORM_LIBS) --end-group \
|
||||
$(filter %.o %.a,$+) -o $@
|
||||
|
||||
%.srec: %.elf
|
||||
$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
|
||||
|
||||
%.ihex: %.elf
|
||||
$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
|
||||
|
||||
%.dis: %.elf
|
||||
$(OBJDUMP) -SD $< > $@
|
||||
|
||||
$(OBJDIR)/%.s: %.S
|
||||
$(CPP) $(AFLAGS) -o $@ $<
|
||||
$(OBJDIR)/%.o: %.S
|
||||
@ -49,7 +61,7 @@ clean:
|
||||
find $(MC1322X) \
|
||||
\( -name 'core' -o -name '*.bak' -o -name '*~' \
|
||||
-o -name '*.o' -o -name '*.a' -o -name '*.obj' -o -name '*.elf' -o -name '*.s' -o -name '*.map' \
|
||||
-o -name 'obj_*_board' -o -name '.depend' \) -print \
|
||||
-o -name 'obj_*_board' -o -name '.depend' -o -name '*.bin' -o -name '*.dis' \) -print \
|
||||
| xargs rm -rf
|
||||
rm -fr *.*~
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
BOARDS = redbee-dev redbee-module redbee-r1 redbee-usb redbee-econotag
|
||||
|
||||
CFLAGS += -I obj_$(BOARD)_board
|
||||
OBJDIR = obj_$(BOARD)_board
|
||||
OBJDIR = ./obj_$(BOARD)_board
|
||||
CFLAGS += -I$(OBJDIR)
|
||||
|
||||
board:
|
||||
$(OBJDIR):
|
||||
ifndef BOARD
|
||||
${warning BOARD not defined}
|
||||
${warning echo "make BOARD=foo"}
|
||||
@ -12,4 +12,6 @@ ifndef BOARD
|
||||
endif
|
||||
@echo "setup object directory for dev board"
|
||||
mkdir -p $(OBJDIR)
|
||||
cp $(MC1322X)/board/$(BOARD).h $(OBJDIR)
|
||||
|
||||
$(OBJDIR)/board.h: $(OBJDIR)
|
||||
ln -s ../$(MC1322X)/board/$(BOARD).h $(OBJDIR)/board.h
|
||||
|
@ -2,5 +2,7 @@ MC1322X = ..
|
||||
|
||||
include $(MC1322X)/Makefile.include
|
||||
|
||||
all: board blink-red_$(BOARD).elf
|
||||
TARGETS = blink-red_$(BOARD).bin
|
||||
|
||||
all: $(OBJDIR) $(OBJDIR)/board.h $(TARGETS) $(TARGETS:.bin=.dis)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user