~ubuntu-branches/ubuntu/raring/makedumpfile/raring-proposed

« back to all changes in this revision

Viewing changes to .pc/use-install-in-makefile.patch/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): John Wright
  • Date: 2010-03-03 17:17:35 UTC
  • mfrom: (1.1.3 upstream) (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100303171735-vxw4zqii21mcj0a0
* New upstream version
* Preserve upstream's original makedumpfile.8 in clean target
* kdump-config: Fix a typo
* Switch to the "3.0 (quilt)" source format
  - Remove unneeded Build-Depends on quilt
* Update kdump-tools.README.Debian to reflect that recent kernels
  don't need a crash kernel start address
* Apply patch from Petter Reinholdtsen to fix incorrect dependencies
  in kdump-tools.init (Closes: #569685)
* Indicate support for Linux 2.6.32
  - Although upstream hasn't updated its LATEST_VERSION macro, this
    version works without modification on Linux 2.6.32.  Squelch a
    warning that a 2.6.32 kernel is not supported.
* Backport upstream commit 4a16bd39866093f4949f8e9dc183fa2321bda22d
  - Fix buffer overflow when writing dh->signature

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# makedumpfile
 
2
 
 
3
VERSION=1.3.5
 
4
DATE=11 November 2009
 
5
 
 
6
CC      = gcc
 
7
CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
 
8
          -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
 
9
          -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
 
10
CFLAGS_ARCH     = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
 
11
                    -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 
12
 
 
13
ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
 
14
                               -e s/arm.*/arm/ -e s/sa110/arm/ \
 
15
                               -e s/s390x/s390/ -e s/parisc64/parisc/ \
 
16
                               -e s/ppc64/powerpc/ )
 
17
CFLAGS += -D__$(ARCH)__
 
18
CFLAGS_ARCH += -D__$(ARCH)__
 
19
 
 
20
ifeq ($(ARCH), powerpc)
 
21
CFLAGS += -m64
 
22
CFLAGS_ARCH += -m64
 
23
endif
 
24
 
 
25
SRC     = makedumpfile.c makedumpfile.h diskdump_mod.h
 
26
SRC_ARCH = x86.c x86_64.c ia64.c ppc64.c
 
27
OBJ_ARCH = x86.o x86_64.o ia64.o ppc64.o
 
28
 
 
29
all: makedumpfile
 
30
 
 
31
$(OBJ_ARCH): $(SRC_ARCH)
 
32
        $(CC) $(CFLAGS_ARCH) -c -o ./$@ ./$(@:.o=.c) 
 
33
 
 
34
makedumpfile: $(SRC) $(OBJ_ARCH)
 
35
        $(CC) $(CFLAGS) $(OBJ_ARCH) -o $@ $< -static -ldw -lelf -lz
 
36
        echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8
 
37
        grep -v "^.TH MAKEDUMPFILE 8" makedumpfile.8 >> temp.8
 
38
        mv temp.8 makedumpfile.8
 
39
        gzip -c ./makedumpfile.8 > ./makedumpfile.8.gz
 
40
 
 
41
clean:
 
42
        rm -f $(OBJ) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz
 
43
 
 
44
install:
 
45
        cp makedumpfile ${DESTDIR}/bin
 
46
        cp makedumpfile-R.pl ${DESTDIR}/bin
 
47
        cp makedumpfile.8.gz ${DESTDIR}/usr/share/man/man8
 
48