diff --git a/Makefile.include b/Makefile.include index 3209ca8c809ee125674a863541dc070119ed4583..59f5b573086a162d41127919ef0f3e2cd6f371a3 100644 --- a/Makefile.include +++ b/Makefile.include @@ -49,6 +49,7 @@ include $(RIOTBASE)/Makefile.dep # your binaries to link BASELIBS += $(BINDIR)$(BOARD)_base.a BASELIBS += $(BINDIR)${PROJECT}.a +BASELIBS += $(USEPKG:%=${BINDIR}%.a) .PHONY: all clean flash doc term @@ -57,7 +58,7 @@ all: $(BINDIR)$(PROJECT).a @echo "Building project $(PROJECT) for $(BOARD) w/ MCU $(MCU)." "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) "$(MAKE)" -C $(RIOTBASE) - @for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i ; done ; + @for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i ; done ; ifeq ($(BUILDOSXNATIVE),1) $(AD)$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie else @@ -91,7 +92,7 @@ $(BINDIR)$(PROJECT)/%.o: %.c $(PROJDEPS) clean: "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) clean "$(MAKE)" -C $(RIOTBASE) clean - @for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i clean ; done ; + @for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean ; done ; rm -rf $(BINDIR) flash: all diff --git a/pkg/USING b/pkg/USING index c19ec531b63f510d18dd110901bf6f01b407850e..06964f28135bb575b342b4185a08d6fc16cc2362 100644 --- a/pkg/USING +++ b/pkg/USING @@ -2,4 +2,4 @@ Packages are included to your project as external modules. Thus you only have to add the following line to your project (and update your INCLUDE path accordingly): -EXTERNAL+=$(RIOTBASE)/pkg/<pkg_name> +USEPKG += <pkg_name>