Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git] / lustre / portals / Rules.linux
1 # included in Linux kernel directories
2 # Rules for module building
3
4 if LINUX25
5
6 basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g' | sed -e 's/^.*\///g')
7 AM_CPPFLAGS= -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2  -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
8
9 $(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
10         $(LD) -m $(MOD_LINK) -r -o $(MODULE)_tmp.o $($(MODULE)_OBJECTS)
11         rm -f $(MODULE)_tmp.c
12         $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(MODULE)_tmp.o
13         $(COMPILE) -UKBUILD_BASENAME -DKBUILD_BASENAME=$(MODULE) -c $(MODULE)_tmp.mod.c
14         $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $(MODULE)_tmp.o $(MODULE)_tmp.mod.o
15
16 else
17
18 $(MODULE).o: $($(MODULE)_OBJECTS)
19         $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $($(MODULE)_OBJECTS)
20
21 endif
22
23 tags:
24         rm -f $(top_srcdir)/TAGS
25         rm -f $(top_srcdir)/tags
26         find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs etags -a
27         find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs etags -a
28         find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs ctags -a
29         find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs ctags -a