$(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c))

2023-12-26 00:08:24
$(warning $(wildcard $(SRCDIR)/crc/*.c))
$(warning $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)))
SOURCE :=	$(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \
		$(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/lib/*.c))) \
		gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
		eta.c verify.c memory.c io_u.c parse.c fio_sem.c rwlock.c \
		pshared.c options.c \
		smalloc.c filehash.c profile.c debug.c engines/cpu.c \
		engines/mmap.c engines/sync.c engines/null.c engines/net.c \
		engines/ftruncate.c engines/filecreate.c engines/filestat.c \
		server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \
		gettime-thread.c helpers.c json.c idletime.c td_error.c \
		profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
		workqueue.c rate-submit.c optgroup.c helper_thread.c \
		steadystate.c zone-dist.c

Makefile:44: ./crc/crc16.c ./crc/sha512.c ./crc/crc7.c ./crc/sha1.c ./crc/crc32c.c ./crc/crc32c-arm64.c ./crc/test.c ./crc/crc32.c ./crc/murmur3.c ./crc/crc32c-intel.c ./crc/xxhash.c ./crc/sha3.c ./crc/sha256.c ./crc/fnv.c ./crc/md5.c ./crc/crc64.c


Makefile:45: crc/crc16.c crc/sha512.c crc/crc7.c crc/sha1.c crc/crc32c.c crc/crc32c-arm64.c crc/test.c crc/crc32.c crc/murmur3.c crc/crc32c-intel.c crc/xxhash.c crc/sha3.c crc/sha256.c crc/fnv.c crc/md5.c crc/crc64.c
?

$(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c))

将$(SRCDIR)/%? ?替换成? ?%,??$(SRCDIR)/ 是? ?./

所以这一句的意思是将所有的c文件 按照例如./crc/crc16.c? 替换成? ?crc/crc16.c的规则进行替换。

文章来源:https://blog.csdn.net/weixin_38987932/article/details/135210852
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。