File: rules

package info (click to toggle)
alsa-tools 1.0.28-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,464 kB
  • ctags: 5,787
  • sloc: ansic: 23,609; cpp: 15,057; sh: 12,305; pascal: 1,140; asm: 1,053; xml: 814; makefile: 733; python: 250
file content (151 lines) | stat: -rwxr-xr-x 4,259 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/make -f
# -*- makefile -*-
# GNU copyright 1997 to 1999 by Joey Hess.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

SUBDIRS_alsa-tools-gui = echomixer envy24control hdajackretask hdspconf hdspmixer rmedigicontrol
SUBDIRS_alsa-tools = as10k1 hda-verb seq/sbiload us428control
SUBDIRS_alsa-firmware-loaders = sb16_csp hdsploader mixartloader pcxhrloader sscape_ctl usx2yloader vxloader
SUBDIRS_tmp = ld10k1
SUBDIRS := $(SUBDIRS_alsa-tools-gui) $(SUBDIRS_alsa-tools) $(SUBDIRS_alsa-firmware-loaders) $(SUBDIRS_tmp)
#SUBDIRS := $(SUBDIRS_tmp)
DOCS = README README.profiles TODO NEWS output.doc

#
# Common
#

config: config-stamp
config-stamp:
	dh_testdir
	dh_autoreconf

	set -e; list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo; \
	  echo "Configuring $$subdir"; \
	  (cd $$subdir && \
	  ./configure \
	    --host=$(DEB_HOST_GNU_TYPE) \
	    --build=$(DEB_BUILD_GNU_TYPE) \
	    --prefix=/usr \
	    --mandir=\$${prefix}/share/man \
	    --infodir=\$${prefix}/share/info \
	    --datadir=\$${prefix}/share \
	    --cache-file=$(CURDIR)/config.cache \
	    $(shell dpkg-buildflags --export=configure) \
	  ); \
	done

	touch config-stamp


#Architecture 
build: build-arch build-indep
build-arch: config build-stamp
build-indep: build-stamp
build-stamp:

	set -e; list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo; \
	  echo "Building $$subdir"; \
	  $(MAKE) -C $$subdir; \
	done

	touch build-arch-stamp

clean: clean-stamp
clean-stamp:
	dh_testdir
	dh_testroot

	rm -f build-arch-stamp config-stamp
	rm -f config.cache

	-list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo; \
	  echo "Cleaning $$subdir"; \
	  $(MAKE) -C $$subdir distclean; \
	done

	dh_autoreconf_clean
	dh_clean

# PKG = package
install-pkg:
	set -e; list='$(SUBDIRS_$(PKG))'; for subdir in $$list; do \
	  (cd $$subdir; \
	  package=$(PKG); \
	  name=$(shell echo \$$subdir | sed -e 's/^.*\///g' | sed -e 's/_/-/g'); \
	  echo; \
	  echo "Installing $$subdir into $$name"; \
	  $(MAKE) install DESTDIR=$(CURDIR)/debian/$$package; \
	  set -e; doc_list='$(DOCS)'; for doc_file in $$doc_list; do \
	    if [ -s $$doc_file ]; then \
	      install -d $(CURDIR)/debian/$$package/usr/share/doc/$$package/$$name; \
	      install $$doc_file $(CURDIR)/debian/$$package/usr/share/doc/$$package/$$name/$$doc_file; \
	    fi; \
          done; \
	  ) \
	done

install: install-arch
install-arch: build-arch
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -s

	$(MAKE) -f debian/rules PKG=alsa-tools install-pkg
	$(MAKE) -f debian/rules PKG=alsa-tools-gui install-pkg
	$(MAKE) -f debian/rules PKG=alsa-firmware-loaders install-pkg
	$(MAKE) -f debian/rules PKG=tmp install-pkg

# Must not depend on anything. This is to be called by binary-arch
# in another 'make' thread.
binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs debian/changelog.ALSA
	dh_installdocs --exclude=Makefile
	dh_installexamples --exclude=.cvsignore --exclude=Makefile.am --exclude=Makefile.in
	chmod 644 $(CURDIR)/debian/ld10k1/usr/share/doc/ld10k1/examples/emu10k1MIDIEffects/pontodo5
	dh_install --list-missing
	(cd debian/ld10k1/usr/bin && mv -f lo10k1 lo10k1.bin && mv -f lo10k1.sh lo10k1)
	dh_installmenu
	dh_installman
	dh_installudev
	dh_installinit
	dh_link
	dh_strip
	# Exclude .asm files because only one is over 4k, and only slightly
	dh_compress -X.asm
	dh_fixperms
	dh_makeshlibs -- -c4
	dh_installdeb
	dh_shlibdeps -l debian/liblo10k1-0/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

binary-indep:
	#Nothing to do here

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