Makefile:"No rule to make ... needed by 'all'" 尽管所有文件都在那里

Makefile: "No rule to make ... needed by 'all'" despite all files being there

我在使用这个 makefile 时遇到了这个奇怪的问题。尽管拥有所有必需的 .c 文件,但编译过程在第一条指令处停止,并出现此错误。

make: *** No rule to make target 'printerTest.umps', needed by 'all'. Stop.

这个具有相同文件的确切代码在 Debian Linux 中有效,但在 Manjaro Arch Linux 中 return 上面显示的错误。

这是生成文件。

ifneq ($(wildcard /usr/bin/umps3),)
    UMPS3_DIR_PREFIX = /usr
    LIBDIR = $(UMPS3_DIR_PREFIX)/lib/x86_64-linux-gnu/umps3
else
    UMPS3_DIR_PREFIX = /usr/local
    LIBDIR = $(UMPS3_DIR_PREFIX)/lib/umps3
endif

INCDIR = $(UMPS3_DIR_PREFIX)/include/umps3/umps
SUPDIR = $(UMPS3_DIR_PREFIX)/share/umps3

TDEFS = h/print.h h/tconst.h $(INCDIR)/libumps.e Makefile

CFLAGS = -ffreestanding -ansi -c -mips1 -mabi=32 -mfp32 -mno-gpopt -G 0 -fno-pic -mno-abicalls
# -Wall

LDAOUTFLAGS = -G 0 -nostdlib -T $(SUPDIR)/umpsaout.ldscript
LDCOREFLAGS =  -G 0 -nostdlib -T $(SUPDIR)/umpscore.ldscript

CC = mipsel-linux-gnu-gcc
LD = mipsel-linux-gnu-ld
AS = mipsel-linux-gnu-as -KPIC

EF = umps3-elf2umps
UDEV = umps3-mkdev

#main target
all: printerTest.umps strConcat.umps \
    fibEight.umps fibEleven.umps \
    terminalTest2.umps terminalTest3.umps terminalTest4.umps \
    terminalTest5.umps  \
    
%.o: %.c $(TDEFS)
    $(CC) $(CFLAGS) $<
    
%.t: %.o print.o  $(LIBDIR)/crti.o
    $(LD) $(LDAOUTFLAGS) $(LIBDIR)/crti.o $< print.o $(LIBDIR)/libumps.o -o $@
    
%.t.aout.umps: %.t
    $(EF) -a $<

%.umps: %.t.aout.umps
    $(UDEV) -f $@ $<

clean:
    rm -f *.o *.t *.umps

感谢提前回答的人:)

如问题评论中所述,问题是 crti.o 文件位于特定的隐藏文件夹中。非常感谢在评论中帮助我的人:)