Files
apfstests/ltp/Makefile
T
Dave Chinner 387165ab40 xfstests: Use common rules to build binaries
Remove explicit target-per-file rules in the subdirectories being
built and replace them with target based rules using the buildrules
hooks for doing this.  This results in the makefiles being simpler,
smaller and more consistent. It does mean that all binaries are
linked against the common set of libraries but this does not cause
any harm.

This patch does not address the dmapi subdirectory of the xfstests
build system.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-20 10:26:10 +11:00

42 lines
853 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
default: $(TARGETS)
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