[go: up one dir, main page]

File: rules

package info (click to toggle)
twofish 0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 256 kB
  • ctags: 168
  • sloc: ansic: 1,143; xml: 237; makefile: 64
file content (86 lines) | stat: -rwxr-xr-x 1,825 bytes parent folder | download
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
#!/usr/bin/make -f
# Debian package build rules file for twofish

CFLAGS = -Wall -g

# if $DEB_BUILD_OPTIONS *doesn't* contain "noopt"
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

SONAME = libtwofish.so.0
ANAME = libtwofish.a
ALINKING = -ltwofish

# Install files to the following directory.
DEVDESTDIR := debian/libtwofish-dev
SODESTDIR := debian/libtwofish0
#SODESTDIR := $(DEVDESTDIR)

build-arch: build-arch-stamp
build-arch-stamp:
	dh_testdir
	#
	gcc -c -o twofish.o $(CFLAGS) twofish.c
	ar clq $(ANAME) twofish.o
	ranlib $(ANAME)
	# Shared library
	-rm twofish.o
	gcc $(CFLAGS) -fPIC -shared -Wl,-soname,$(SONAME) \
		-Wl,-z,defs -lc -o $(SONAME) twofish.c
	#
	# test suite
	gcc -o twofishtest $(CFLAGS) main.c -L. $(ALINKING)
	./twofishtest
	touch build-arch-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp
	-rm -f twofish.o $(ANAME) twofishtest $(SONAME)
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	install -m 755 -d $(DEVDESTDIR)/usr/lib
	install -m 644 $(ANAME) $(DEVDESTDIR)/usr/lib
	install -m 755 -d $(DEVDESTDIR)/usr/include
	install -m 644 twofish.h $(DEVDESTDIR)/usr/include
	install -m 755 -d $(SODESTDIR)/usr/lib
	install -m 644 $(SONAME) $(SODESTDIR)/usr/lib

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installman
	dh_installchangelogs
	dh_installexamples
	dh_install
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_lintian
	dh_makeshlibs -V
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol
	dh_md5sums
	dh_builddeb

build-indep:
# no architecture-indepdent files to build

binary-indep:
# no architecture-indepdent packages to build

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