05dbead7ca30f6dc84771748a786797e84711f8a
[xfstests-dev.git] / dmapi / src / suite1 / cmd / 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 # things needing -ldm -lhandle -ldmtest
25 DM_TARGS = test_assumption get_eventlist set_eventlist set_disp \
26                 get_region get_dmattr set_dmattr remove_dmattr \
27                 probe_hole probe_punch_xfsctl_hole punch_hole \
28                 get_fileattr sync_by_handle getall_dmattr \
29                 set_fileattr path_to_handle path_to_fshandle \
30                 get_mountinfo getall_disp get_events dm_handle \
31                 handle_to_fshandle get_config_events get_allocinfo \
32                 create_userevent request_right release_right \
33                 upgrade_right query_right downgrade_right \
34                 obj_ref_hold obj_ref_rele obj_ref_query print_event \
35                 get_dirattrs
36
37 # things needing -ldm -lhandle
38 NT_TARGS = fd_to_handle handle_to_path init_service pending \
39                 print_fshandle respond_event
40
41 # things needing -ldm -ldmtest
42 NTDM_TARGS = make_sparse randomize_file rwt struct_test
43
44 # things left out for some reason...
45 UNUSED_TARGS = make_rt_sparse security_hole2 security_hole
46
47 TARGETS = $(DM_TARGS) $(NT_TARGS) $(NTDM_TARGS) link_test
48
49 CFILES = $(TARGETS:=.c)
50 LDIRT = $(TARGETS)
51
52 CFLAGS += -I$(TOPDIR)/dmapi/src/common -I/usr/include/xfs
53
54 LLDLIBS = $(TOPDIR)/dmapi/src/common/lib/libdmtest.la $(LIBDM)
55
56 default: depend $(TARGETS)
57
58 depend: .dep
59
60 include $(BUILDRULES)
61
62 install install-dev: default
63
64 $(TARGETS):
65         @echo "    [CC]    $@"
66         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
67
68 -include .dep