1*49cdfc7eSAndroid Build Coastguard Worker# 2*49cdfc7eSAndroid Build Coastguard Worker# Copyright (C) 2012 Linux Test Project, Inc. 3*49cdfc7eSAndroid Build Coastguard Worker# 4*49cdfc7eSAndroid Build Coastguard Worker# This program is free software; you can redistribute it and/or modify 5*49cdfc7eSAndroid Build Coastguard Worker# it under the terms of the GNU General Public License as published by 6*49cdfc7eSAndroid Build Coastguard Worker# the Free Software Foundation; either version 2 of the License, or 7*49cdfc7eSAndroid Build Coastguard Worker# (at your option) any later version. 8*49cdfc7eSAndroid Build Coastguard Worker# 9*49cdfc7eSAndroid Build Coastguard Worker# This program is distributed in the hope that it will be useful, 10*49cdfc7eSAndroid Build Coastguard Worker# but WITHOUT ANY WARRANTY; without even the implied warranty of 11*49cdfc7eSAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 12*49cdfc7eSAndroid Build Coastguard Worker# the GNU General Public License for more details. 13*49cdfc7eSAndroid Build Coastguard Worker# 14*49cdfc7eSAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License 15*49cdfc7eSAndroid Build Coastguard Worker# along with this program; if not, write to the Free Software 16*49cdfc7eSAndroid Build Coastguard Worker# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17*49cdfc7eSAndroid Build Coastguard Worker# 18*49cdfc7eSAndroid Build Coastguard Worker 19*49cdfc7eSAndroid Build Coastguard WorkerKERNEL_SRCDIR := $(abs_top_srcdir)/testcases/kernel 20*49cdfc7eSAndroid Build Coastguard WorkerLIBKERNTEST_SRCDIR := $(KERNEL_SRCDIR)/lib 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard WorkerKERNEL_DIR := $(abs_top_builddir)/testcases/kernel 23*49cdfc7eSAndroid Build Coastguard WorkerLIBKERNTEST_DIR := $(KERNEL_DIR)/lib 24*49cdfc7eSAndroid Build Coastguard WorkerLIBKERNTEST := $(LIBKERNTEST_DIR)/libkerntest.a 25*49cdfc7eSAndroid Build Coastguard WorkerCPPFLAGS += -I$(KERNEL_SRCDIR)/include 26*49cdfc7eSAndroid Build Coastguard WorkerLDLIBS += -lkerntest -lltp $(NUMA_LIBS) 27*49cdfc7eSAndroid Build Coastguard WorkerLDFLAGS += -L$(LIBKERNTEST_DIR) 28*49cdfc7eSAndroid Build Coastguard Worker 29*49cdfc7eSAndroid Build Coastguard Worker$(LIBKERNTEST_DIR): 30*49cdfc7eSAndroid Build Coastguard Worker mkdir -p "$@" 31*49cdfc7eSAndroid Build Coastguard Worker 32*49cdfc7eSAndroid Build Coastguard Worker$(LIBKERNTEST): $(LIBKERNTEST_DIR) 33*49cdfc7eSAndroid Build Coastguard Worker $(MAKE) -C $^ -f "$(LIBKERNTEST_SRCDIR)/Makefile" all 34*49cdfc7eSAndroid Build Coastguard Worker 35*49cdfc7eSAndroid Build Coastguard WorkerMAKE_DEPS += $(LIBKERNTEST) 36*49cdfc7eSAndroid Build Coastguard Worker 37*49cdfc7eSAndroid Build Coastguard Workertrunk-clean:: | lib-clean 38*49cdfc7eSAndroid Build Coastguard Worker 39*49cdfc7eSAndroid Build Coastguard Workerlib-clean:: $(LIBKERNTEST_DIR) 40*49cdfc7eSAndroid Build Coastguard Worker $(MAKE) -C $^ -f "$(LIBKERNTEST_SRCDIR)/Makefile" clean 41