mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
a241a16214
Make it so "make depend" is a generic target, like "make clean".
Each Makefile has a "depend" target that indicates whether making
dependencies means creating ".dep" or creating ".ltdep" (or, I
suppose, both, though none do that right now). Both files get
created even if there are no CFILES to scan (to ensure the target
up-to-date). The "default" target now depends on "depend" (there is
no "ltdepend" any more).
Remove the "depend" and "ltdepend" definitions from the "buildrules"
file; only the actual generated files (".dep" and ".ltdep") remain
as generic targets. The "depend' target is still defined as phony.
Do a shell trick when expanding the value of CFILES, to avoid a
problem that occurs if it is created by "make" by concatentating two
empty strings. The problem was that in that case CFILES will
contain a space, and that wasn't getting treated as empty as
desired.
Make the rule for tool/lib dependencies more generic, to reflect the
general desire that "lib" subdirectories need to be built before
things in the "tool" subdirectories.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
49 lines
949 B
Makefile
49 lines
949 B
Makefile
#
|
|
# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
|
|
#
|
|
|
|
TOPDIR = ..
|
|
include $(TOPDIR)/include/builddefs
|
|
|
|
TARGETS = doio fsstress fsx growfiles iogen
|
|
CFILES = $(TARGETS:=.c)
|
|
HFILES = doio.h
|
|
LDIRT = $(TARGETS)
|
|
LCFLAGS = -DXFS
|
|
LCFLAGS += -I$(TOPDIR)/src #Used for including $(TOPDIR)/src/global.h
|
|
|
|
ifeq ($(HAVE_ATTR_LIST), true)
|
|
LCFLAGS += -DHAVE_ATTR_LIST
|
|
LLDLIBS += $(LIBATTR)
|
|
endif
|
|
ifeq ($(PKG_PLATFORM),irix)
|
|
LCFLAGS += -DHAVE_ATTR_LIST
|
|
LLDLIBS += $(LIBATTR)
|
|
endif
|
|
|
|
ifeq ($(HAVE_AIO), true)
|
|
TARGETS += aio-stress
|
|
LCFLAGS += -DAIO
|
|
LLDLIBS += -laio -lpthread
|
|
endif
|
|
|
|
ifeq ($(HAVE_FALLOCATE), true)
|
|
LCFLAGS += -DFALLOCATE
|
|
endif
|
|
|
|
default: depend $(TARGETS)
|
|
|
|
depend: .dep
|
|
|
|
include $(BUILDRULES)
|
|
|
|
$(TARGETS): $(LIBTEST)
|
|
@echo " [CC] $@"
|
|
$(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
|
|
|
|
install: default
|
|
$(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp
|
|
$(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp
|
|
|
|
-include .dep
|