Whamcloud - gitweb
fix lmake to link to correct ia64 kernels
[fs/lustre-release.git] / lustre / Rules
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
6 # Build a kernel module, name.o, and install it in $(moduledir) by:
7 #  MODULE = name
8 #  module_DATA = name.o
9 #  EXTRA_PROGRAMS = name
10 #  name_SOURCES = my.c files.c
11 #  include $(top_srcdir)/Rules
12
13 if LINUX25
14
15 # We still need to link each module with vermagic.o to get rid of "kernel taited" warnings.
16 basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g')
17 AM_CPPFLAGS=-I$(top_builddir)/include -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2  -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
18
19 else
20
21 AM_CPPFLAGS=-I$(top_builddir)/include
22
23 endif
24
25 $(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
26         $(LD) -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r -o $(MODULE).o $($(MODULE)_OBJECTS)
27
28 tags:
29         rm -f $(top_srcdir)/TAGS
30         ETAGSF=`etags --version | grep -iq exuberant && \
31                 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
32         find $(top_srcdir) -name '*.[hc]' | xargs etags $$ETAGSF -a
33
34         rm -f $(top_srcdir)/tags
35         CTAGSF=`ctags --version | grep -iq exuberant && \
36                 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
37         find $(top_srcdir) -name '*.[hc]' | xargs ctags $$CTAGSF -a
38