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)
|
.built: $(OBJS)
|
||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
$(Q) touch .built
|
$(Q) touch $@
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(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)
|
install: $(BIN_DIR)$(DELIM)$(PROGNAME)
|
||||||
else
|
else
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# apps/canutils/uavcan/Makefile
|
# 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>
|
# Author: Paul Alexander Patience <paul-a.patience@polymtl.ca>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -177,31 +177,31 @@ all: .built
|
|||||||
.PHONY: clean depend distclean
|
.PHONY: clean depend distclean
|
||||||
|
|
||||||
$(LIBUAVCAN_PACKNAME):
|
$(LIBUAVCAN_PACKNAME):
|
||||||
@echo "Downloading: $(LIBUAVCAN_PACKNAME)"
|
@echo "Downloading: $@"
|
||||||
$(Q) $(WGET) -O $(LIBUAVCAN_PACKNAME) $(LIBUAVCAN_URL)$(DELIM)$(LIBUAVCAN_VERSION)$(PACKEXT)
|
$(Q) $(WGET) -O $@ $(LIBUAVCAN_URL)$(DELIM)$(LIBUAVCAN_VERSION)$(PACKEXT)
|
||||||
|
|
||||||
$(LIBUAVCAN_UNPACKNAME): $(LIBUAVCAN_PACKNAME)
|
$(LIBUAVCAN_UNPACKNAME): $(LIBUAVCAN_PACKNAME)
|
||||||
@echo "Unpacking: $(LIBUAVCAN_PACKNAME) -> $(LIBUAVCAN_UNPACKNAME)"
|
@echo "Unpacking: $< -> $@"
|
||||||
$(Q) $(UNPACK) $(LIBUAVCAN_PACKNAME)
|
$(Q) $(UNPACK) $<
|
||||||
$(Q) touch $(LIBUAVCAN_UNPACKNAME)
|
$(Q) touch $@
|
||||||
|
|
||||||
$(DSDL_PACKNAME):
|
$(DSDL_PACKNAME):
|
||||||
@echo "Downloading: $(DSDL_PACKNAME)"
|
@echo "Downloading: $@"
|
||||||
$(Q) $(WGET) -O $(DSDL_PACKNAME) $(DSDL_URL)$(DELIM)$(DSDL_VERSION)$(PACKEXT)
|
$(Q) $(WGET) -O $@ $(DSDL_URL)$(DELIM)$(DSDL_VERSION)$(PACKEXT)
|
||||||
|
|
||||||
$(DSDL_UNPACKNAME): $(DSDL_PACKNAME)
|
$(DSDL_UNPACKNAME): $(DSDL_PACKNAME)
|
||||||
@echo "Unpacking: $(DSDL_PACKNAME) -> $(DSDL_UNPACKNAME)"
|
@echo "Unpacking: $< -> $@"
|
||||||
$(Q) $(UNPACK) $(DSDL_PACKNAME)
|
$(Q) $(UNPACK) $<
|
||||||
$(Q) touch $(DSDL_UNPACKNAME)
|
$(Q) touch $@
|
||||||
|
|
||||||
$(PYUAVCAN_PACKNAME):
|
$(PYUAVCAN_PACKNAME):
|
||||||
@echo "Downloading: $(PYUAVCAN_PACKNAME)"
|
@echo "Downloading: $@"
|
||||||
$(Q) $(WGET) -O $(PYUAVCAN_PACKNAME) $(PYUAVCAN_URL)$(DELIM)$(PYUAVCAN_VERSION)$(PACKEXT)
|
$(Q) $(WGET) -O $@ $(PYUAVCAN_URL)$(DELIM)$(PYUAVCAN_VERSION)$(PACKEXT)
|
||||||
|
|
||||||
$(PYUAVCAN_UNPACKNAME): $(PYUAVCAN_PACKNAME)
|
$(PYUAVCAN_UNPACKNAME): $(PYUAVCAN_PACKNAME)
|
||||||
@echo "Unpacking: $(PYUAVCAN_PACKNAME) -> $(PYUAVCAN_UNPACKNAME)"
|
@echo "Unpacking: $< -> $@"
|
||||||
$(Q) $(UNPACK) $(PYUAVCAN_PACKNAME)
|
$(Q) $(UNPACK) $<
|
||||||
$(Q) touch $(PYUAVCAN_UNPACKNAME)
|
$(Q) touch $@
|
||||||
|
|
||||||
libuavcan: $(LIBUAVCAN_UNPACKNAME) $(DSDL_UNPACKNAME) $(PYUAVCAN_UNPACKNAME)
|
libuavcan: $(LIBUAVCAN_UNPACKNAME) $(DSDL_UNPACKNAME) $(PYUAVCAN_UNPACKNAME)
|
||||||
$(Q) cp -R $(LIBUAVCAN_UNPACKNAME) libuavcan
|
$(Q) cp -R $(LIBUAVCAN_UNPACKNAME) libuavcan
|
||||||
@ -226,7 +226,7 @@ $(CXXOBJS): %$(OBJEXT): %$(CXXEXT)
|
|||||||
|
|
||||||
.built: $(CXXOBJS)
|
.built: $(CXXOBJS)
|
||||||
$(call ARCHIVE, $(BIN), $(CXXOBJS))
|
$(call ARCHIVE, $(BIN), $(CXXOBJS))
|
||||||
$(Q) touch .built
|
$(Q) touch $@
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ MICROPYTHON_UNPACKNAME = micropython-$(MICROPYTHON_VERSION)
|
|||||||
UNPACK ?= tar -zxf
|
UNPACK ?= tar -zxf
|
||||||
|
|
||||||
MICROPYTHON_UNPACKDIR = $(WD)/$(MICROPYTHON_UNPACKNAME)
|
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
|
# 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 - Tool prefix (same as CROSSDEV in NuttX)
|
||||||
|
|
||||||
CROSS_COMPILE ?= $(CROSSDEV)
|
CROSS_COMPILE ?= $(CROSSDEV)
|
||||||
-include $(MICROPTHYON_SRCDIR)/mkenv.mk
|
-include $(MICROPYTHON_SRCDIR)/mkenv.mk
|
||||||
|
|
||||||
# qstr definitions (must come before including py.mk)
|
# qstr definitions (must come before including py.mk)
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ QSTR_DEFS = qstrdefsport.h
|
|||||||
|
|
||||||
# Include py core make definitions
|
# Include py core make definitions
|
||||||
|
|
||||||
-include $(MICROPTHYON_SRCDIR)/py.mk
|
-include $(MICROPYTHON_SRCDIR)/py.mk
|
||||||
|
|
||||||
# c99 is needed for Micro Python
|
# c99 is needed for Micro Python
|
||||||
|
|
||||||
@ -140,13 +140,13 @@ $(MICROPYTHON_UNPACKNAME): $(MICROPYTHON_TARBALL)
|
|||||||
|
|
||||||
.built: $(MICROPYTHON_UNPACKNAME) $(OBJ)
|
.built: $(MICROPYTHON_UNPACKNAME) $(OBJ)
|
||||||
$(call ARCHIVE, $(BIN), $(OBJ))
|
$(call ARCHIVE, $(BIN), $(OBJ))
|
||||||
@touch .built
|
@touch $@
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(MICROPYTHON_UNPACKNAME) $(OBJ) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(MICROPYTHON_UNPACKNAME) $(OBJ) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(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)
|
install: $(BIN_DIR)$(DELIM)$(PROGNAME)
|
||||||
else
|
else
|
||||||
@ -180,5 +180,5 @@ distclean: clean
|
|||||||
$(call DELFILE, .downloaded)
|
$(call DELFILE, .downloaded)
|
||||||
$(call DELFILE, $(MICROPYTHON_TARBALL))
|
$(call DELFILE, $(MICROPYTHON_TARBALL))
|
||||||
|
|
||||||
-include $(MICROPTHYON_SRCDIR)/mkrules.mk
|
-include $(MICROPYTHON_SRCDIR)/mkrules.mk
|
||||||
-include Make.dep
|
-include Make.dep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user