标签: makefile
如何在Makefile中的目录中包含所有库?
假设我想在目录/libdir中包含所有库,我该怎么做?
/libdir
结果应该是这样的:
INCLUDES = -I/libdir/lib1 -I/libdir/lib2 -I/libdir/lib3 ...
答案 0 :(得分:3)
LIBDIRS = $(wildcard /libdir/*) INCLUDES = $(addprefix -I, $(LIBDIRS))