Whamcloud - gitweb
* fix build breakage when this branch is built in a real SLES10 env
[fs/lustre-release.git] / libsysio / tests / Makefile.am
1 noinst_PROGRAMS = test_copy test_stats test_path test_list \
2         test_getcwd test_link test_unlink test_rename \
3         test_regions test_stddir test_fcntl_lock
4
5 CLEANFILES=drv_data.c
6
7 if WITH_NATIVE_DRIVER
8 NATIVE_DRIVER_NAME=native
9 NATIVE_DRIVER_CFLAGS= -I$(top_srcdir)/drivers/native
10 else
11 NATIVE_DRIVER_NAME=
12 NATIVE_DRIVER_CFLAGS=
13 endif
14
15 if WITH_INCORE_DRIVER
16 INCORE_DRIVER_NAME=incore
17 INCORE_DRIVER_CFLAGS= -I$(top_srcdir)/drivers/incore
18 else
19 INCORE_DRIVER_NAME=
20 INCORE_DRIVER_CFLAGS=
21 endif
22
23 if WITH_CPLANT_YOD
24 YOD_DRIVER_NAME=yod
25 YOD_DRIVER_CFLAGS= -DCPLANT_YOD
26 else
27 YOD_DRIVER_NAME=
28 YOD_DRIVER_CFLAGS=
29 endif
30
31 DRIVERS=$(NATIVE_DRIVER_NAME) $(INCORE_DRIVER_NAME) $(YOD_DRIVER_NAME) \
32         $(STFD_DEV_NAME)
33
34 CMNSRC=startup.c drv_init_all.c drv_data.c
35
36 BUILT_SOURCES=drv_data.c
37
38 CFL=$(AM_CFLAGS) $(AM_CPPFLAGS) \
39         $(NATIVE_DRIVER_CFLAGS) $(INCORE_DRIVER_CFLAGS) \
40         $(STDFD_DEV_CFLAGS) $(YOD_DRIVER_CFLAGS)
41
42 LIBS=$(LIBBUILD_DIR)/libsysio.a
43
44 test_copy_SOURCES=test_copy.c $(CMNSRC)
45 test_copy_CFLAGS=$(CFL)
46 test_copy_DEPENDENCIES=$(LIBS)
47
48 test_stats_SOURCES=test_stats.c $(CMNSRC)
49 test_stats_CFLAGS=$(CFL)
50 test_stats_DEPENDENCIES=$(LIBS)
51
52 test_path_SOURCES=test_path.c $(CMNSRC)
53 test_path_CFLAGS=$(CFL)
54 test_path_DEPENDENCIES=$(LIBS)
55
56 test_list_SOURCES=test_list.c $(CMNSRC)
57 test_list_CFLAGS=$(CFL)
58 test_list_DEPENDENCIES=$(LIBS)
59
60 test_getcwd_SOURCES=test_getcwd.c $(CMNSRC)
61 test_getcwd_CFLAGS=$(CFL)
62 test_getcwd_DEPENDENCIES=$(LIBS)
63
64 test_link_SOURCES=test_link.c $(CMNSRC)
65 test_link_CFLAGS=$(CFL)
66 test_link_DEPENDENCIES=$(LIBS)
67
68 test_unlink_SOURCES=test_unlink.c $(CMNSRC)
69 test_unlink_CFLAGS=$(CFL)
70 test_unlink_DEPENDENCIES=$(LIBS)
71
72 test_rename_SOURCES=test_rename.c $(CMNSRC)
73 test_rename_CFLAGS=$(CFL)
74 test_rename_DEPENDENCIES=$(LIBS)
75
76 test_regions_SOURCES=test_regions.c $(CMNSRC)
77 test_regions_CFLAGS=$(CFL)
78 test_regions_DEPENDENCIES=$(LIBS)
79
80 test_stddir_SOURCES=test_stddir.c $(CMNSRC)
81 test_stddir_CFLAGS=$(CFL)
82 test_stddir_DEPENDENCIES=$(LIBS)
83
84 test_fcntl_lock_SOURCES=test_fcntl_lock.c $(CMNSRC)
85 test_fcntl_lock_CFLAGS=$(CFL)
86 test_fcntl_lock_DEPENDENCIES=$(LIBS)
87
88 drv_data.c: $(CONFIG_DEPENDENCIES) $(top_srcdir)/tests/gendrvdata.sh
89         test -z "drv_data.c" && rm -f drv_data.c; \
90         $(SHELL) $(top_srcdir)/tests/gendrvdata.sh $(DRIVERS) > drv_data.c
91
92 lib_LIBRARIES=libruntime.a
93
94 libruntime_a_SOURCES=sysio-run-start.c startup.c drv_init_all.c drv_data.c
95
96 AM_CFLAGS = -L$(LIBBUILD_DIR)
97 include $(top_srcdir)/Rules.make