2 exec_prefix = @
exec_prefix@
5 libexecdir
= @libexecdir@
8 datarootdir
= @datarootdir@
13 CCFLAGS
= $(CFLAGS
) @bfd_include_dir@
17 PACKAGE_VERSION
= @PACKAGE_VERSION@
18 PACKAGE_BUGREPORT
= @PACKAGE_BUGREPORT@
20 perl_primary
= ksplice-create ksplice-view ksplice-apply ksplice-undo ksplice.pm
21 perl_man
= $(patsubst %,%.8,$(perl_primary
))
23 have_static
:= $(wildcard objmanip-static
)
25 default
: $(perl_primary
) $(perl_man
) objutils
26 @echo
"Ready for 'make install'"
28 ifeq ($(strip $(have_static
)),)
30 objutils
: objdiff objmanip
32 install-objdiff
: objdiff
33 install -m755
-D objdiff
$(DESTDIR
)$(libexecdir
)/ksplice-objdiff
35 install-objmanip
: objmanip
36 install -m755
-D objmanip
$(DESTDIR
)$(libexecdir
)/ksplice-objmanip
43 install -m755
-D objdiff-static
$(DESTDIR
)$(libexecdir
)/ksplice-objdiff
46 install -m755
-D objmanip-static
$(DESTDIR
)$(libexecdir
)/ksplice-objmanip
50 $(perl_primary
): %: %.in Makefile
51 $(SED
) 's|PACKAGE_VERSION|$(PACKAGE_VERSION)|;s|PACKAGE_BUGREPORT|$(PACKAGE_BUGREPORT)|;s|KSPLICE_DATA_DIR|$(datadir)/ksplice|;s|KSPLICE_LIBEXEC_DIR|$(libexecdir)|' $< > $@
54 pod2man
--center
="Ksplice" --release
="Ksplice v$(PACKAGE_VERSION)" --section
=8 $< $@
56 objdiff objmanip
: objdiff.c objmanip.c objcommon.c objcommon.h allcommon-user
57 $(CC
) $(CCFLAGS
) $(LDFLAGS
) $@.c objcommon.c allcommon-user
$(LIBS
) -o
$@
59 allcommon-user
: kmodsrc
/allcommon.c kmodsrc
/allcommon.h
60 $(CC
) -c kmodsrc
/allcommon.c
-o
$@
62 install: default install-objmanip install-objdiff
63 install -m644
-D ksplice-create
.8 $(DESTDIR
)$(mandir)/man8
/ksplice-create
.8
64 install -m644
-D ksplice-apply
.8 $(DESTDIR
)$(mandir)/man8
/ksplice-apply
.8
65 install -m644
-D ksplice-undo
.8 $(DESTDIR
)$(mandir)/man8
/ksplice-undo
.8
66 install -m644
-D ksplice-view
.8 $(DESTDIR
)$(mandir)/man8
/ksplice-view
.8
67 install -m755
-D ksplice-create
$(DESTDIR
)$(bindir)/ksplice-create
68 install -m755
-D ksplice-view
$(DESTDIR
)$(bindir)/ksplice-view
69 install -m755
-D ksplice-apply
$(DESTDIR
)$(sbindir
)/ksplice-apply
70 install -m755
-D ksplice-undo
$(DESTDIR
)$(sbindir
)/ksplice-undo
71 install -m755
-D gendiff-reversed
$(DESTDIR
)$(libexecdir
)/ksplice-gendiff-reversed
72 install -m644
-D ksplice.pm
$(DESTDIR
)$(datadir)/ksplice
/ksplice.pm
73 install -m644
-D kmodsrc
/helper.c
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/helper.c
74 install -m644
-D kmodsrc
/helper.h
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/helper.h
75 install -m644
-D kmodsrc
/primary.c
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/primary.c
76 install -m644
-D kmodsrc
/primary.h
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/primary.h
77 install -m644
-D kmodsrc
/modcommon.c
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/modcommon.c
78 install -m644
-D kmodsrc
/modcommon.h
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/modcommon.h
79 install -m644
-D kmodsrc
/allcommon.c
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/allcommon.c
80 install -m644
-D kmodsrc
/allcommon.h
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/allcommon.h
81 install -m644
-D kmodsrc
/jumps.h
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/jumps.h
82 install -m644
-D kmodsrc
/nops.h
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/nops.h
83 install -m644
-D kmodsrc
/Makefile
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/Makefile
84 install -m644
-D kmodsrc
/ld-script
$(DESTDIR
)$(datadir)/ksplice
/kmodsrc
/ld-script
89 rm -f objdiff objmanip allcommon-user
93 rm -f objdiff-static objmanip-static
94 rm -f configure config.status config.log