Several Makefiles: Add .PHONY definitions to prevent 'clean up to date' message weirdness; Add default definitions for some commonly used things when 'make clean' is used without .config or Make.defs files installed.

This commit is contained in:
Gregory Nutt 2016-05-10 15:40:20 -06:00
parent a2e83fe135
commit 29e8b8e059
21 changed files with 104 additions and 44 deletions

View file

@ -1,7 +1,7 @@
############################################################################
# apps/examples/module/Makefile
#
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
# Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -35,6 +35,10 @@
-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs
OBJEXT ?= .o
DELIM ?= /
include $(APPDIR)/Make.defs
# Module example built-in application info

View file

@ -1,7 +1,7 @@
############################################################################
# examples/module/drivers/chardev/Makefile
#
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
# Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -35,6 +35,9 @@
-include $(TOPDIR)/Make.defs
OBJEXT ?= .o
DELIM ?= /
ifeq ($(WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)lib}"
else
@ -71,6 +74,7 @@ SRCS = $(BIN).c
OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
.PHONY: clean install
$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"