Skip to content

Commit

Permalink
Makefile: Unify ROOTDEPPATH into DEPPATH
Browse files Browse the repository at this point in the history
DEPPATH is commonly used in nuttx repo, so it to be the same with them.
  • Loading branch information
SPRESENSE authored and jerpelea committed Jul 29, 2020
1 parent 381b83e commit 63cd701
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
11 changes: 5 additions & 6 deletions Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ ifneq ($(BUILD_MODULE),y)
OBJS += $(MAINOBJ)
endif

ROOTDEPPATH += --dep-path .
ROOTDEPPATH += $(DEPPATH)
ROOTDEPPATH += --obj-path .
ROOTDEPPATH += --obj-suffix $(SUFFIX)$(OBJEXT)
DEPPATH += --dep-path .
DEPPATH += --obj-path .
DEPPATH += --obj-suffix $(SUFFIX)$(OBJEXT)

VPATH += :.

Expand Down Expand Up @@ -226,9 +225,9 @@ endif

.depend: Makefile $(wildcard $(foreach SRC, $(SRCS), $(addsuffix /$(SRC), $(subst :, ,$(VPATH))))) $(DEPCONFIG)
ifeq ($(filter %$(CXXEXT),$(SRCS)),)
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$(filter-out $(DEPCONFIG),$^)) >Make.dep
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$(filter-out $(DEPCONFIG),$^)) >Make.dep
else
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$(filter-out $(DEPCONFIG),$^)) >Make.dep
$(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$(filter-out $(DEPCONFIG),$^)) >Make.dep
endif
$(Q) touch $@

Expand Down
2 changes: 1 addition & 1 deletion examples/elf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_ELF)

ROOTDEPPATH := --dep-path tests
DEPPATH := --dep-path tests

# Build targets

Expand Down
2 changes: 1 addition & 1 deletion examples/module/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ CSRCS += mod_symtab.c
MAINSRC = module_main.c

VPATH += drivers
ROOTDEPPATH += --dep-path drivers
DEPPATH += --dep-path drivers

# Build targets

Expand Down
2 changes: 1 addition & 1 deletion examples/nxflat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_NXFLAT)

ROOTDEPPATH := --dep-path tests
DEPPATH := --dep-path tests

VPATH += :tests

Expand Down
2 changes: 1 addition & 1 deletion examples/posix_spawn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_POSIXSPAWN)

ROOTDEPPATH += --dep-path filesystem
DEPPATH += --dep-path filesystem

# Build targets

Expand Down
2 changes: 1 addition & 1 deletion examples/sotest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif
CSRCS += sot_symtab.c
MAINSRC = sotest_main.c

ROOTDEPPATH += --dep-path lib
DEPPATH += --dep-path lib

# Build targets

Expand Down
2 changes: 1 addition & 1 deletion examples/thttpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_THTTPD)

VPATH += content
ROOTDEPPATH += --dep-path content
DEPPATH += --dep-path content

content/romfs.c: build
ifeq ($(CONFIG_THTTPD_NXFLAT),y)
Expand Down
2 changes: 1 addition & 1 deletion examples/thttpd/content/Makefile.binfs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ STACKSIZE = $(CONFIG_THTTPD_CGI_STACKSIZE)

CSRCS = hello.c tasks.c

ROOTDEPPATH += --dep-path hello --dep-path tasks
DEPPATH += --dep-path hello --dep-path tasks
VPATH += :hello:tasks

include $(APPDIR)/Application.mk
Expand Down
2 changes: 1 addition & 1 deletion interpreters/ficl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ASRCS += $(FICL_ASRCS)
CXXSRCS += $(FICL_CXXSRCS)
CSRCS += $(FICL_CSRCS)

ROOTDEPPATH += --dep-path src
DEPPATH += --dep-path src

VPATH += :src:$(FICL_SUBDIR)

Expand Down
6 changes: 3 additions & 3 deletions platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ else
endif

VPATH += board
ROOTDEPPATH += --obj-path bin
ROOTDEPPATH += --obj-suffix $(OBJEXT)
ROOTDEPPATH += --dep-path $(PLATFORMDIR)
DEPPATH += --obj-path bin
DEPPATH += --obj-suffix $(OBJEXT)
DEPPATH += --dep-path $(PLATFORMDIR)

# Binaries

Expand Down
2 changes: 1 addition & 1 deletion system/hexed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ MAINSRC = hexed.c
CFLAGS += ${shell $(INCDIR) "$(CC)" include}

VPATH += :src
ROOTDEPPATH += --dep-path src
DEPPATH += --dep-path src

include $(APPDIR)/Application.mk

0 comments on commit 63cd701

Please sign in to comment.