xref: /aosp_15_r20/external/ltp/lib/Makefile (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker# Copyright (C) 2009, Cisco Systems Inc.
3*49cdfc7eSAndroid Build Coastguard Worker# Ngie Cooper, July 2009
4*49cdfc7eSAndroid Build Coastguard Worker
5*49cdfc7eSAndroid Build Coastguard Workertop_srcdir		?= ..
6*49cdfc7eSAndroid Build Coastguard Worker
7*49cdfc7eSAndroid Build Coastguard Workerinclude $(top_srcdir)/include/mk/env_pre.mk
8*49cdfc7eSAndroid Build Coastguard Worker
9*49cdfc7eSAndroid Build Coastguard WorkerCFLAGS			+= -I. -DLTPLIB
10*49cdfc7eSAndroid Build Coastguard Worker
11*49cdfc7eSAndroid Build Coastguard Workerifneq ($(ANDROID),1)
12*49cdfc7eSAndroid Build Coastguard WorkerFILTER_OUT_DIRS		+= android_libpthread android_librt
13*49cdfc7eSAndroid Build Coastguard Workerelse
14*49cdfc7eSAndroid Build Coastguard WorkerFILTER_OUT_LIBSRCS	+= tlibio.c tst_safe_sysv_ipc.c
15*49cdfc7eSAndroid Build Coastguard Workerendif
16*49cdfc7eSAndroid Build Coastguard Worker
17*49cdfc7eSAndroid Build Coastguard WorkerINTERNAL_LIB		:= libltp.a
18*49cdfc7eSAndroid Build Coastguard Worker
19*49cdfc7eSAndroid Build Coastguard Workerpc_file			:= $(DESTDIR)/$(datarootdir)/pkgconfig/ltp.pc
20*49cdfc7eSAndroid Build Coastguard Worker
21*49cdfc7eSAndroid Build Coastguard WorkerINSTALL_TARGETS		:= $(pc_file)
22*49cdfc7eSAndroid Build Coastguard Worker
23*49cdfc7eSAndroid Build Coastguard Workertst_test.o: ltp-version.h
24*49cdfc7eSAndroid Build Coastguard Worker
25*49cdfc7eSAndroid Build Coastguard Workerltp-version.h: gen_version
26*49cdfc7eSAndroid Build Coastguard Worker
27*49cdfc7eSAndroid Build Coastguard WorkerMAKE_TARGETS += gen_version
28*49cdfc7eSAndroid Build Coastguard Worker
29*49cdfc7eSAndroid Build Coastguard Worker.PHONY: gen_version
30*49cdfc7eSAndroid Build Coastguard Workergen_version:
31*49cdfc7eSAndroid Build Coastguard Worker	@echo GEN ltp-version.h
32*49cdfc7eSAndroid Build Coastguard Worker	@$(top_srcdir)/lib/gen_version.sh
33*49cdfc7eSAndroid Build Coastguard Worker
34*49cdfc7eSAndroid Build Coastguard WorkerCLEAN_TARGETS += ltp-version.h cached-version
35*49cdfc7eSAndroid Build Coastguard Worker
36*49cdfc7eSAndroid Build Coastguard Worker$(pc_file):
37*49cdfc7eSAndroid Build Coastguard Worker	test -d "$(@D)" || mkdir -p "$(@D)"
38*49cdfc7eSAndroid Build Coastguard Worker	install -m $(INSTALL_MODE) "$(builddir)/$(@F)" "$@"
39*49cdfc7eSAndroid Build Coastguard Worker
40*49cdfc7eSAndroid Build Coastguard Workerinclude $(top_srcdir)/include/mk/lib.mk
41*49cdfc7eSAndroid Build Coastguard Workerinclude $(top_srcdir)/include/mk/generic_trunk_target.mk
42