File: rules

package info (click to toggle)
squeak-plugins-scratch 1.4.0.2~svn.r83-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 584 kB
  • sloc: ansic: 1,360; makefile: 91; sh: 88
file content (79 lines) | stat: -rwxr-xr-x 1,835 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
#!/usr/bin/make -f

export DH_ALWAYS_EXCLUDE=.svn

LDFLAGS=-Wl,-z,defs -Wl,--as-needed -Wl,--no-undefined
CFLAGS=-std=gnu89

config: config-stamp
config-stamp: 
	dh_testdir
	[ ! -d debian/patches ] || $(MAKE) -f /usr/share/quilt/quilt.make patch
	touch $@

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: config
	dh_testdir
	cd camera/ && \
		gcc $(CFLAGS) -g -fPIC -c *.c
	cd camera/ && \
		gcc $(LDFLAGS) -g -shared *.o -lv4l2 -ldl -o so.CameraPlugin
	cd scratch/ && \
		gcc $(CFLAGS) -g -fPIC -c *.c
	cd scratch/ && \
		gcc $(LDFLAGS) -g -shared *.o -lm -o so.ScratchPlugin
	cd unicode/ && \
		gcc $(CFLAGS) -g -fPIC -c `pkg-config --cflags pangocairo` *.c
	cd unicode/ && \
		gcc $(LDFLAGS) -g -shared *.o `pkg-config --libs pangocairo` -lc -o so.UnicodePlugin
	cd wedo/ && \
		gcc $(CFLAGS) -g -fPIC -c *.c
	cd wedo/ && \
		gcc $(LDFLAGS) -g -shared *.o -o so.WeDoPlugin
	touch $@

clean: 
	dh_testdir
	dh_testroot
	rm -fv build-stamp config-stamp
	rm -fv camera/*.o camera/so.CameraPlugin
	rm -fv scratch/*.o scratch/so.ScratchPlugin
	rm -fv unicode/*.o unicode/so.UnicodePlugin
	rm -fv wedo/*.o wedo/so.WeDoPlugin
	rm -fv App/* Plugins/*
	[ ! -d debian/patches ] || $(MAKE) -f /usr/share/quilt/quilt.make unpatch
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

binary-indep:

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs -a
	dh_installdocs -a
	dh_installexamples -a
	dh_install -a
	dh_installman -a
	dh_link -a
	dh_strip -a --dbg-package=squeak-plugins-scratch-dbg
	dh_compress -a
	dh_fixperms -a
#	dh_makeshlibs -a
	[ ! -e /usr/bin/dh_buildinfo ] || dh_buildinfo -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean