Merged in paulpatience/nuttx-apps/makefiles (pull request #35)
Simplify some Makefiles
This commit is contained in:
commit
c663c11764
@ -90,13 +90,13 @@ endif
|
||||
|
||||
.built: $(OBJS)
|
||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||
$(Q) touch .built
|
||||
$(Q) touch $@
|
||||
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||
@echo "LD: $(PROGNAME)"
|
||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME)
|
||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME)
|
||||
|
||||
install: $(BIN_DIR)$(DELIM)$(PROGNAME)
|
||||
else
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# apps/canutils/uavcan/Makefile
|
||||
#
|
||||
# Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved.
|
||||
# Copyright (C) 2015-2016 Omni Hoverboards Inc. All rights reserved.
|
||||
# Author: Paul Alexander Patience <paul-a.patience@polymtl.ca>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -177,31 +177,31 @@ all: .built
|
||||
.PHONY: clean depend distclean
|
||||
|
||||
$(LIBUAVCAN_PACKNAME):
|
||||
@echo "Downloading: $(LIBUAVCAN_PACKNAME)"
|
||||
$(Q) $(WGET) -O $(LIBUAVCAN_PACKNAME) $(LIBUAVCAN_URL)$(DELIM)$(LIBUAVCAN_VERSION)$(PACKEXT)
|
||||
@echo "Downloading: $@"
|
||||
$(Q) $(WGET) -O $@ $(LIBUAVCAN_URL)$(DELIM)$(LIBUAVCAN_VERSION)$(PACKEXT)
|
||||
|
||||
$(LIBUAVCAN_UNPACKNAME): $(LIBUAVCAN_PACKNAME)
|
||||
@echo "Unpacking: $(LIBUAVCAN_PACKNAME) -> $(LIBUAVCAN_UNPACKNAME)"
|
||||
$(Q) $(UNPACK) $(LIBUAVCAN_PACKNAME)
|
||||
$(Q) touch $(LIBUAVCAN_UNPACKNAME)
|
||||
@echo "Unpacking: $< -> $@"
|
||||
$(Q) $(UNPACK) $<
|
||||
$(Q) touch $@
|
||||
|
||||
$(DSDL_PACKNAME):
|
||||
@echo "Downloading: $(DSDL_PACKNAME)"
|
||||
$(Q) $(WGET) -O $(DSDL_PACKNAME) $(DSDL_URL)$(DELIM)$(DSDL_VERSION)$(PACKEXT)
|
||||
@echo "Downloading: $@"
|
||||
$(Q) $(WGET) -O $@ $(DSDL_URL)$(DELIM)$(DSDL_VERSION)$(PACKEXT)
|
||||
|
||||
$(DSDL_UNPACKNAME): $(DSDL_PACKNAME)
|
||||
@echo "Unpacking: $(DSDL_PACKNAME) -> $(DSDL_UNPACKNAME)"
|
||||
$(Q) $(UNPACK) $(DSDL_PACKNAME)
|
||||
$(Q) touch $(DSDL_UNPACKNAME)
|
||||
@echo "Unpacking: $< -> $@"
|
||||
$(Q) $(UNPACK) $<
|
||||
$(Q) touch $@
|
||||
|
||||
$(PYUAVCAN_PACKNAME):
|
||||
@echo "Downloading: $(PYUAVCAN_PACKNAME)"
|
||||
$(Q) $(WGET) -O $(PYUAVCAN_PACKNAME) $(PYUAVCAN_URL)$(DELIM)$(PYUAVCAN_VERSION)$(PACKEXT)
|
||||
@echo "Downloading: $@"
|
||||
$(Q) $(WGET) -O $@ $(PYUAVCAN_URL)$(DELIM)$(PYUAVCAN_VERSION)$(PACKEXT)
|
||||
|
||||
$(PYUAVCAN_UNPACKNAME): $(PYUAVCAN_PACKNAME)
|
||||
@echo "Unpacking: $(PYUAVCAN_PACKNAME) -> $(PYUAVCAN_UNPACKNAME)"
|
||||
$(Q) $(UNPACK) $(PYUAVCAN_PACKNAME)
|
||||
$(Q) touch $(PYUAVCAN_UNPACKNAME)
|
||||
@echo "Unpacking: $< -> $@"
|
||||
$(Q) $(UNPACK) $<
|
||||
$(Q) touch $@
|
||||
|
||||
libuavcan: $(LIBUAVCAN_UNPACKNAME) $(DSDL_UNPACKNAME) $(PYUAVCAN_UNPACKNAME)
|
||||
$(Q) cp -R $(LIBUAVCAN_UNPACKNAME) libuavcan
|
||||
@ -226,7 +226,7 @@ $(CXXOBJS): %$(OBJEXT): %$(CXXEXT)
|
||||
|
||||
.built: $(CXXOBJS)
|
||||
$(call ARCHIVE, $(BIN), $(CXXOBJS))
|
||||
$(Q) touch .built
|
||||
$(Q) touch $@
|
||||
|
||||
install:
|
||||
|
||||
|
@ -55,7 +55,7 @@ MICROPYTHON_UNPACKNAME = micropython-$(MICROPYTHON_VERSION)
|
||||
UNPACK ?= tar -zxf
|
||||
|
||||
MICROPYTHON_UNPACKDIR = $(WD)/$(MICROPYTHON_UNPACKNAME)
|
||||
MICROPTHYON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py
|
||||
MICROPYTHON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py
|
||||
|
||||
# Get the Micro Python build environment. mkenv.mk has these dependencies
|
||||
#
|
||||
@ -63,7 +63,7 @@ MICROPTHYON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py
|
||||
# CROSS_COMPILE - Tool prefix (same as CROSSDEV in NuttX)
|
||||
|
||||
CROSS_COMPILE ?= $(CROSSDEV)
|
||||
-include $(MICROPTHYON_SRCDIR)/mkenv.mk
|
||||
-include $(MICROPYTHON_SRCDIR)/mkenv.mk
|
||||
|
||||
# qstr definitions (must come before including py.mk)
|
||||
|
||||
@ -71,7 +71,7 @@ QSTR_DEFS = qstrdefsport.h
|
||||
|
||||
# Include py core make definitions
|
||||
|
||||
-include $(MICROPTHYON_SRCDIR)/py.mk
|
||||
-include $(MICROPYTHON_SRCDIR)/py.mk
|
||||
|
||||
# c99 is needed for Micro Python
|
||||
|
||||
@ -140,13 +140,13 @@ $(MICROPYTHON_UNPACKNAME): $(MICROPYTHON_TARBALL)
|
||||
|
||||
.built: $(MICROPYTHON_UNPACKNAME) $(OBJ)
|
||||
$(call ARCHIVE, $(BIN), $(OBJ))
|
||||
@touch .built
|
||||
@touch $@
|
||||
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(MICROPYTHON_UNPACKNAME) $(OBJ) $(MAINOBJ)
|
||||
@echo "LD: $(PROGNAME)"
|
||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME)
|
||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME)
|
||||
|
||||
install: $(BIN_DIR)$(DELIM)$(PROGNAME)
|
||||
else
|
||||
@ -180,5 +180,5 @@ distclean: clean
|
||||
$(call DELFILE, .downloaded)
|
||||
$(call DELFILE, $(MICROPYTHON_TARBALL))
|
||||
|
||||
-include $(MICROPTHYON_SRCDIR)/mkrules.mk
|
||||
-include $(MICROPYTHON_SRCDIR)/mkrules.mk
|
||||
-include Make.dep
|
||||
|
Loading…
Reference in New Issue
Block a user