Browse Source

* renamed makefiles to Makefile

* included a more convenient approach to organize Makefiles
dev/timer
Oliver Hahm 10 years ago
parent
commit
8df4d77996
  1. 0
      Makefile
  2. 0
      chronos/Makefile
  3. 0
      msb-430-common/Makefile
  4. 21
      msb-430-common/Makefile.include
  5. 0
      msb-430-common/drivers/Makefile
  6. 37
      msb-430/Makefile
  7. 1
      msb-430/Makefile.include
  8. 0
      msb-430h/Makefile
  9. 0
      msba2-common/Makefile
  10. 0
      msba2-common/drivers/Makefile
  11. 0
      msba2/Makefile

0
makefile → Makefile

0
chronos/makefile → chronos/Makefile

0
msb-430-common/makefile → msb-430-common/Makefile

21
msb-430-common/Makefile.include

@ -0,0 +1,21 @@
## the cpu to build for
export CPU = msp430x16x
export MCU = msp430x1612
# toolchain config
export PREFIX = @msp430-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU)
export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2
export AS = $(PREFIX)as
export LINK = $(PREFIX)gcc
export SIZE = $(PREFIX)size
export OBJCOPY = $(PREFIX)objcopy
export LINKFLAGS = -mmcu=$(MCU) -lgcc $(RIOTBASE)/bin/startup.o
export FLASHER = mspdebug
ifeq ($(strip $(PORT)),)
export PORT = /dev/ttyUSB0
endif
export HEXFILE = bin/$(PROJECT).hex
export FFLAGS = -d $(PORT) -j uif "prog $(HEXFILE)"

0
msb-430-common/drivers/makefile → msb-430-common/drivers/Makefile

37
msb-430/Makefile

@ -0,0 +1,37 @@
SRC = $(wildcard *.c)
BINDIR = bin/
OBJ = $(SRC:%.c=$(BINDIR)%.o)## defines
export ARCH = msb-430_base.a
DEP = $(SRC:%.c=$(BINDIR)%.d)
INCLUDES += -I$(RIOTBOARD)/msb-430-common/include/
INCLUDES += -I$(RIOTBASE)/cpu/msp430-common/include/
INCLUDES += -I$(RIOTBASE)/cpu/msp430x16x/include/
all: $(BINDIR)$(ARCH)
$(MAKE) -C ../msb-430-common
$(BINDIR)$(ARCH): $(OBJ)
mkdir -p $(BINDIR)
$(AR) rcs $(BINDIR)$(ARCH) $(OBJ)
# pull in dependency info for *existing* .o files
-include $(OBJ:.o=.d)
# compile and generate dependency info
$(BINDIR)%.o: %.c
$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
@printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
# remove compilation products
clean:
$(MAKE) -C ../msb-430-common clean
rm -f $(BINDIR)$(ARCH) $(OBJ) $(DEP)
@if [ -d $(BINDIR) ] ; \
then rmdir $(BINDIR) ; \
fi

1
msb-430/Makefile.include

@ -0,0 +1 @@
include $(RIOTBOARD)/msb-430-common/Makefile.include

0
msb-430h/makefile → msb-430h/Makefile

0
msba2-common/makefile → msba2-common/Makefile

0
msba2-common/drivers/makefile → msba2-common/drivers/Makefile

0
msba2/makefile → msba2/Makefile

Loading…
Cancel
Save