Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[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)
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         rm -f $(top_srcdir)/tags
31         find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs etags -a
32         find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs ctags -a
33