1 # Copyright (C) 2001 Cluster File Systems, Inc.
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
6 # Build a kernel module, name.o, and install it in $(moduledir) by:
9 # EXTRA_PROGRAMS = name
10 # name_SOURCES = my.c files.c
11 # include $(top_srcdir)/Rules
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)
21 AM_CPPFLAGS=-I$(top_builddir)/include
25 $(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
26 $(LD) -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r -o $(MODULE).o $($(MODULE)_OBJECTS)
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
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