2 # Copyright (C) 2011 SGI All Rights Reserved.
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.
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.
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
22 include $(TOPDIR)/include/builddefs
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 \
37 # things needing -ldm -lhandle
38 NT_TARGS = fd_to_handle handle_to_path init_service pending \
39 print_fshandle respond_event
41 # things needing -ldm -ldmtest
42 NTDM_TARGS = make_sparse randomize_file rwt struct_test
44 # things left out for some reason...
45 UNUSED_TARGS = make_rt_sparse security_hole2 security_hole
47 TARGETS = $(DM_TARGS) $(NT_TARGS) $(NTDM_TARGS) link_test
49 CFILES = $(TARGETS:=.c)
52 CFLAGS += -I$(TOPDIR)/dmapi/src/common -I/usr/include/xfs
54 LLDLIBS = $(TOPDIR)/dmapi/src/common/lib/libdmtest.la $(LIBDM)
56 default: depend $(TARGETS)
62 install install-dev: default
64 $(TARGETS): $(LLDLIBS)
66 $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)