aboutsummaryrefslogtreecommitdiff
path: root/nuttx/configs/px4io
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/px4io')
-rw-r--r--nuttx/configs/px4io/common/Make.defs43
-rw-r--r--nuttx/configs/px4io/src/Makefile9
2 files changed, 9 insertions, 43 deletions
diff --git a/nuttx/configs/px4io/common/Make.defs b/nuttx/configs/px4io/common/Make.defs
index a3996a9ed..d6d52e3d2 100644
--- a/nuttx/configs/px4io/common/Make.defs
+++ b/nuttx/configs/px4io/common/Make.defs
@@ -39,12 +39,15 @@
# Make.defs in the per-config directories.
#
+include ${TOPDIR}/tools/Config.mk
+
#
# We only support building with the ARM bare-metal toolchain from
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
#
+CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI
-CROSSDEV = arm-none-eabi-
+include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
@@ -160,46 +163,10 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-# If VERBOSE is set, don't hide the compiler invocations.
-ifeq ($(VERBOSE),YES)
-_v =
-else
-_v = @
-endif
-
-define PREPROCESS
- @echo "CPP: $1->$2"
- @$(CPP) $(CPPFLAGS) $(abspath $1) -o $2
-endef
-
-define COMPILE
- @echo "CC: $1"
- $(_v)$(CC) -c $(CFLAGS) $(abspath $1) -o $2
-endef
-
-define COMPILEXX
- @echo "CXX: $1"
- $(_v)$(CXX) -c $(CXXFLAGS) $(abspath $1) -o $2
-endef
-
-define ASSEMBLE
- @echo "AS: $1"
- $(_v)$(CC) -c $(AFLAGS) $(abspath $1) -o $2
-endef
-
# produce partially-linked $1 from files in $2
define PRELINK
@echo "PRELINK: $1"
- @$(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
-endef
-
-define ARCHIVE
- echo "AR: $2"; \
- $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
-endef
-
-define CLEAN
- @rm -f *.o *.a
+ $(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
endef
HOSTCC = gcc
diff --git a/nuttx/configs/px4io/src/Makefile b/nuttx/configs/px4io/src/Makefile
index 144fa8549..bb9539d16 100644
--- a/nuttx/configs/px4io/src/Makefile
+++ b/nuttx/configs/px4io/src/Makefile
@@ -65,9 +65,7 @@ $(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
- @( for obj in $(OBJS) ; do \
- $(call ARCHIVE, $@, $${obj}); \
- done ; )
+ $(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS)
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -76,10 +74,11 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend
clean:
- @rm -f libboard$(LIBEXT) *~ .*.swp
+ $(call DELFILE, libboard$(LIBEXT))
$(call CLEAN)
distclean: clean
- @rm -f Make.dep .depend
+ $(call DELFILE, Make.dep)
+ $(call DELFILE, .depend)
-include Make.dep