xfstests: rework "dmapi" subtree build mechanism
[xfstests-dev.git] / dmapi / src / suite2 / src / Makefile
1 #
2 # Copyright (C) 2011 SGI  All Rights Reserved.
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 # 02110-1301, USA.
18 #
19
20 TOPDIR = ../../../..
21
22 include $(TOPDIR)/include/builddefs
23
24 TARGETS = test_rights test_fileattr test_hole test_dmattr \
25                 test_eventlist test_region test_bulkall \
26                 test_bulkattr send_msg dm_test_daemon test_invis \
27                 invis_test region_test test_efault mmap
28
29 # things left out for some reason...
30 UNUSED_TARGS = check_dmapi.c mmap_cp.c mm_fill.c
31
32 CFILES = $(TARGETS:=.c)
33 LDIRT = $(TARGETS)
34
35 CFLAGS += -I.. -I$(TOPDIR)/dmapi/src/common -I/usr/include/xfs
36
37 LLDLIBS = $(TOPDIR)/dmapi/src/common/lib/libdmtest.la $(LIBDM)
38
39 default: depend $(TARGETS)
40
41 depend: .dep
42
43 include $(BUILDRULES)
44
45 install install-dev: default
46
47 $(TARGETS): $(LLDLIBS)
48         @echo "    [CC]    $@"
49         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
50
51 -include .dep