mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
makefile: fix libc/mm files can not be compiled incrementally
Use double delim to fix windows native build and give an error: makefile:132: *** target mode do not include“%”. stop. In Windows environment DELIM := $(strip \) but \ has two role: first: \ as directory, and second \ as Escape character, Reference: https://github.com/apache/nuttx/pull/7572#discussion_r1028219229 Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
1113746d44
commit
2be18a8b24
+18
-4
@@ -66,6 +66,20 @@ include wchar/Make.defs
|
|||||||
include wctype/Make.defs
|
include wctype/Make.defs
|
||||||
include wqueue/Make.defs
|
include wqueue/Make.defs
|
||||||
|
|
||||||
|
# Use double delim to fix windows native build and give an error:
|
||||||
|
# makefile:132: *** target mode do not include“%”. stop.
|
||||||
|
#
|
||||||
|
# In Windows environment DELIM := $(strip \) but \ has two role:
|
||||||
|
# first: \ as directory, and second \ as Escape character, Reference:
|
||||||
|
#
|
||||||
|
# https://github.com/apache/nuttx/pull/7572#discussion_r1028219229
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
DELIMS = $(DELIM)$(DELIM)
|
||||||
|
else
|
||||||
|
DELIMS = $(DELIM)
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc
|
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc
|
||||||
|
|
||||||
# Rule for the symbol table generation
|
# Rule for the symbol table generation
|
||||||
@@ -113,8 +127,8 @@ endif
|
|||||||
|
|
||||||
BINDIR ?= bin
|
BINDIR ?= bin
|
||||||
|
|
||||||
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(ASRCS))
|
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIMS)%$(OBJEXT), $(ASRCS))
|
||||||
COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(CSRCS))
|
COBJS = $(patsubst %.c, $(BINDIR)$(DELIMS)%$(OBJEXT), $(CSRCS))
|
||||||
|
|
||||||
SRCS = $(ASRCS) $(CSRCS)
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
@@ -125,12 +139,12 @@ BIN ?= libc$(LIBEXT)
|
|||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
.PHONY: clean distclean
|
.PHONY: clean distclean
|
||||||
|
|
||||||
$(AOBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.S
|
$(AOBJS): $(BINDIR)$(DELIMS)%$(OBJEXT): %.S
|
||||||
$(call ASSEMBLE, $<, $@)
|
$(call ASSEMBLE, $<, $@)
|
||||||
|
|
||||||
# REVISIT: Backslash causes problems in $(COBJS) target
|
# REVISIT: Backslash causes problems in $(COBJS) target
|
||||||
|
|
||||||
$(COBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.c
|
$(COBJS): $(BINDIR)$(DELIMS)%$(OBJEXT): %.c
|
||||||
$(call COMPILE, $<, $@)
|
$(call COMPILE, $<, $@)
|
||||||
|
|
||||||
# C library for the flat build and
|
# C library for the flat build and
|
||||||
|
|||||||
+18
-4
@@ -37,10 +37,24 @@ include map/Make.defs
|
|||||||
|
|
||||||
BINDIR ?= bin
|
BINDIR ?= bin
|
||||||
|
|
||||||
|
# Use double delim to fix windows native build and give an error:
|
||||||
|
# makefile:132: *** target mode do not include“%”. stop.
|
||||||
|
#
|
||||||
|
# In Windows environment DELIM := $(strip \) but \ has two role:
|
||||||
|
# first: \ as directory, and second \ as Escape character, Reference:
|
||||||
|
#
|
||||||
|
# https://github.com/apache/nuttx/pull/7572#discussion_r1028219229
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
DELIMS = $(DELIM)$(DELIM)
|
||||||
|
else
|
||||||
|
DELIMS = $(DELIM)
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)mm
|
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)mm
|
||||||
|
|
||||||
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(ASRCS))
|
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIMS)%$(OBJEXT), $(ASRCS))
|
||||||
COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(CSRCS))
|
COBJS = $(patsubst %.c, $(BINDIR)$(DELIMS)%$(OBJEXT), $(CSRCS))
|
||||||
|
|
||||||
SRCS = $(ASRCS) $(CSRCS)
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
@@ -51,12 +65,12 @@ BIN ?= libmm$(LIBEXT)
|
|||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
.PHONY: context depend clean distclean
|
.PHONY: context depend clean distclean
|
||||||
|
|
||||||
$(AOBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.S
|
$(AOBJS): $(BINDIR)$(DELIMS)%$(OBJEXT): %.S
|
||||||
$(call ASSEMBLE, $<, $@)
|
$(call ASSEMBLE, $<, $@)
|
||||||
|
|
||||||
# REVISIT: Backslash causes problems in $(COBJS) target
|
# REVISIT: Backslash causes problems in $(COBJS) target
|
||||||
|
|
||||||
$(COBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.c
|
$(COBJS): $(BINDIR)$(DELIMS)%$(OBJEXT): %.c
|
||||||
$(call COMPILE, $<, $@)
|
$(call COMPILE, $<, $@)
|
||||||
|
|
||||||
# Memory manager for the flat build and
|
# Memory manager for the flat build and
|
||||||
|
|||||||
Reference in New Issue
Block a user