Whamcloud - gitweb
LU-5626 ldiskfs: update non-htree dotdot in rename
[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                 cp -fp lustre_dlm_flags_wshark.c \
18                         $(top_builddir)/lustre/contrib/wireshark/. ; \
19         else cp $(top_builddir)/lustre/include/$@ . ; fi
20
21 install : $(targ) install.sh
22         DESTDIR="$(DESTDIR)" ./install.sh
23
24 clean :
25         rm -f *~ *flags.[hc] ag-log*
26
27 clobber :
28         git clean -f -x -d .
29
30 flags : lustre_dlm_flags
31 lustre_dlm_flags : $(targ)
32         $(CC) -o $@ -g3 -O0 -DLDLM_FLAGS_PROGRAM=1 lustre_dlm_flags.c
33
34 crash : lustre-crash-ext.so
35 lustre-crash-ext.so : $(targ)
36         $(CC) -g3 -O0 $(cropt) -o $@ lustre_dlm_flags.c
37
38 .PHONY : crash flags