libc and mm/Makefile:Fix an error caused by backslash in Windows native build

libc and mm/Makefile:Fix an error caused by backslash in Windows native build
This commit is contained in:
zouboan 2022-11-10 21:04:59 +08:00 committed by Xiang Xiao
parent e2c2cc16ee
commit eaea38e0f2
2 changed files with 20 additions and 16 deletions

View File

@ -114,8 +114,8 @@ endif
BINDIR ?= bin
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)%$(OBJEXT), $(ASRCS))
COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(ASRCS))
COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(CSRCS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
@ -126,10 +126,12 @@ BIN ?= libc$(LIBEXT)
all: $(BIN)
.PHONY: clean distclean
$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
$(AOBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
# REVISIT: Backslash causes problems in $(COBJS) target
$(COBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# C library for the flat build and
@ -194,9 +196,9 @@ distclean:: clean
$(Q) $(MAKE) -C kbin distclean
$(Q) $(MAKE) -C zoneinfo distclean BIN=$(BIN)
$(call DELFILE, exec_symtab.c)
$(call DELFILE, bin/Make.dep)
$(call DELFILE, kbin/Make.dep)
$(call DELFILE, bin$(DELIM)Make.dep)
$(call DELFILE, kbin$(DELIM)Make.dep)
$(call DELFILE, .depend)
-include bin/Make.dep
-include kbin/Make.dep
-include bin$(DELIM)Make.dep
-include kbin$(DELIM)Make.dep

View File

@ -37,8 +37,8 @@ BINDIR ?= bin
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)mm
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)%$(OBJEXT), $(ASRCS))
COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(ASRCS))
COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(CSRCS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
@ -49,10 +49,12 @@ BIN ?= libmm$(LIBEXT)
all: $(BIN)
.PHONY: clean distclean
$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
$(AOBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
# REVISIT: Backslash causes problems in $(COBJS) target
$(COBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# Memory manager for the flat build and
@ -101,9 +103,9 @@ clean:
distclean: clean
$(Q) $(MAKE) -C bin distclean
$(Q) $(MAKE) -C kbin distclean
$(call DELFILE, bin/Make.dep)
$(call DELFILE, kbin/Make.dep)
$(call DELFILE, bin$(DELIM)Make.dep)
$(call DELFILE, kbin$(DELIM)Make.dep)
$(call DELFILE, .depend)
-include bin/Make.dep
-include kbin/Make.dep
-include bin$(DELIM)Make.dep
-include kbin$(DELIM)Make.dep