Whamcloud - gitweb
land b_v26 (20040316_1603)
[fs/lustre-release.git] / lustre / lvfs / Makefile.am
1 # Copyright (C) 2001  Cluster File Systems, Inc.
2 #
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
5 DEFS= 
6
7 if LIBLUSTRE
8 noinst_LIBRARIES = liblvfs.a
9 liblvfs_a_SOURCES = lvfs_userfs.c
10 liblvfs_a_CFLAGS = -fPIC
11
12 #if MYSQL
13 #liblvfs_a_SOURCES += lvfs_user_mysql.c
14 #endif
15
16 else
17
18 MODULE = lvfs
19
20 if EXTN
21 FSMOD = fsfilt_extN
22 else
23 FSMOD = fsfilt_ext3
24 endif
25
26 modulefs_DATA = lvfs.o $(FSMOD).o
27
28 EXTRA_PROGRAMS = lvfs $(FSMOD)
29 lvfs_SOURCES = lvfs_common.c lvfs_linux.c fsfilt.c lvfs_internal.h
30 if EXTN
31 fsfilt_extN_SOURCES = fsfilt_extN.c lvfs_internal.h
32 else
33 fsfilt_ext3_SOURCES = fsfilt_ext3.c lvfs_internal.h
34 endif
35 endif
36
37 include $(top_srcdir)/Rules
38
39 if LINUX25
40 # workaround for fsfilt_ext3
41 $(FSMOD).o: $(FSMOD).c
42         $(COMPILE) -UKBUILD_MODNAME -DKBUILD_MODNAME=$(FSMOD) -c -o $(FSMOD)_tmp.o $<
43         rm -f $(FSMOD)_tmp.c
44         $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(FSMOD)_tmp.o
45         $(COMPILE) -UKBUILD_MODNAME -UKBUILD_BASENAME -DKBUILD_BASENAME=$(FSMOD) \
46                 -c $(FSMOD)_tmp.mod.c
47         $(LD) -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r \
48                 -o $(FSMOD).o $(FSMOD)_tmp.o $(FSMOD)_tmp.mod.o
49 endif