Whamcloud - gitweb
LU-3335 scrub: OI scrub on OST
[fs/lustre-release.git] / contrib / bit-masks / Makefile
1
2 top_builddir = ../..
3 src   = lustre_dlm_flags.def lustre_dlm_flags.tpl
4 targ  = lustre_dlm_flags.h
5 cropt = -nostartfiles -shared -rdynamic -fPIC
6
7 default : $(targ)
8 all     : $(targ) flags crash
9
10 $(targ) : $(src)
11         @set -x ; \
12         if autogen --version >/dev/null 2>&1 ; then \
13                 autogen -DTESTING=1 lustre_dlm_flags.def ; \
14                 rm -f $(top_builddir)/lustre/include/$@ ; \
15                 sed '/It has been AutoGen-ed/s/-ed.*/-ed/;s/ *$$//' \
16                         $@ > $(top_builddir)/lustre/include/$@ ; \
17         else cp $(top_builddir)/lustre/include/$@ . ; fi
18
19 install : $(targ) install.sh
20         DESTDIR="$(DESTDIR)" ./install.sh
21
22 clean :
23         rm -f *~ *flags.[hc] ag-log*
24
25 clobber :
26         git clean -f -x -d .
27
28 flags : lustre_dlm_flags
29 lustre_dlm_flags : $(targ)
30         $(CC) -o $@ -g3 -O0 -DLDLM_FLAGS_PROGRAM=1 lustre_dlm_flags.c
31
32 crash : lustre-crash-ext.so
33 lustre-crash-ext.so : $(targ)
34         $(CC) -g3 -O0 $(cropt) -o $@ lustre_dlm_flags.c
35
36 .PHONY : crash flags