File: rules~

package info (click to toggle)
pgapack 1.0.0.1-2.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,348 kB
  • ctags: 1,780
  • sloc: ansic: 10,331; fortran: 2,985; sh: 574; makefile: 431; perl: 105
file content (115 lines) | stat: -rw-r--r-- 3,249 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#! /usr/bin/make -f
#

CC = gcc
CFLAGS = -O2 -Wall -D_REENTRANT
FC = g77
FFLAGS = -O2
LDFLAGS =

SHELL = /bin/sh
srcdir = .

INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL) -m 755 -o root -g root
INSTALL_DATA = $(INSTALL) -m 644 -o root -g root
INSTALL_DIR = $(INSTALL) -d -m 755 -o root -g root

#config:
#	$(checkdir)
#	./configure -arch linux -debug -cc "$(CC)" -f77 "$(FC)" -cflags "$(CFLAGS)" \
#	  -fflags "$(FFLAGS)"
#	touch stamp-config

build:
	$(checkdir)
#	test -f stamp-config || make -f debian/rules config
	./configure -arch linux -debug -cc "$(CC)" -f77 "$(FC)" -cflags "$(CFLAGS)" \
	  -fflags "$(FFLAGS)"
	( cd source && make )
	-rm -f lib/linux/*.o
	./configure -arch linux -cc "$(CC)" -f77 "$(FC)" -cflags "$(CFLAGS)" \
	  -fflags "$(FFLAGS)"
	( cd source && make )
	sh debian/fixman.sh
	touch stamp-build

clean:
	$(checkdir)
	./configure -arch linux -cc "$(CC)" -f77 "$(FC)" -cflags "$(CFLAGS)" \
	  -fflags "$(FFLAGS)"
	test -f stamp-config || make -f debian/rules config
	-make clean
	-find . -name 'Makefile' -print0 |xargs -0r rm -f
	-rm -rf lib/linux
	-rm -f examples.tar.gz
	-rm -f test/*.h examples/fortran/*.h examples/mgh/*.h
	-rm -f include/mpi.h include/mpif.h
	-rm -rf tmpman
	-rm -f config.status
	-rm -f stamp-config stamp-build
	-rm -rf debian/tmp* debian/files debian/substvars

binary-indep: checkroot
	$(checkdir)

binary-arch: checkroot
	$(checkdir)
	-rm -rf debian/tmp*
	test -f stamp-build || make -f debian/rules build
#
#
# debian/tmp
	$(INSTALL_DIR) debian/tmp
	$(INSTALL_DIR) debian/tmp/DEBIAN
# libraries
	$(INSTALL_DIR) debian/tmp/usr/lib
	$(INSTALL_DATA) lib/linux/libpgaO.a debian/tmp/usr/lib
	$(INSTALL_DATA) lib/linux/libpgag.a debian/tmp/usr/lib
# headers
	$(INSTALL_DIR) debian/tmp/usr/include
	$(INSTALL_DATA) include/pgapack.h debian/tmp/usr/include
	$(INSTALL_DATA) include/pgapackf.h debian/tmp/usr/include
	$(INSTALL_DATA) include/fakempi_h debian/tmp/usr/include
	$(INSTALL_DATA) include/fakempif_h debian/tmp/usr/include
#
	( cd debian/tmp/usr/include && \
	  ln -fs fakempi_h mpi.h && \
	  ln -fs fakempif_h mpif.h )
# man pages
	$(INSTALL_DIR) debian/tmp/usr/share/man/man3
	$(INSTALL_DATA)	tmpman/* debian/tmp/usr/share/man/man3
	-gzip -9fr debian/tmp/usr/share/man
# documentation
	$(INSTALL_DIR) debian/tmp/usr/share/doc/pgapack
	$(INSTALL_DATA) debian/copyright debian/tmp/usr/share/doc/pgapack
	$(INSTALL_DATA) debian/changelog \
	  debian/tmp/usr/share/doc/pgapack/changelog.Debian
	-gzip -9f debian/tmp/usr/share/doc/pgapack/changelog.Debian
#
	$(INSTALL_DATA) README debian/tmp/usr/share/doc/pgapack
	$(INSTALL_DATA) CHANGES debian/tmp/usr/share/doc/pgapack/changelog
	-gzip -9f debian/tmp/usr/share/doc/pgapack/changelog
	$(INSTALL_DATA) docs/user_guide.ps debian/tmp/usr/share/doc/pgapack
	-gzip -9f debian/tmp/usr/share/doc/pgapack/user_guide.ps
#
	tar -chf examples.tar examples
	-gzip -9f examples.tar
	$(INSTALL_DATA)	*.tar.gz debian/tmp/usr/share/doc/pgapack

#
# build the package
	dpkg-gencontrol  -isp -ppgapack -Pdebian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f source/pga.c -a -f debian/rules
endef

binary: binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: config build clean binary binary-arch binary-indep