File: Makefile

package info (click to toggle)
alsadriver 0.4.1i-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,256 kB
  • ctags: 15,024
  • sloc: ansic: 96,846; makefile: 1,232; sh: 1,051; perl: 54
file content (99 lines) | stat: -rw-r--r-- 2,728 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
#
# Makefile for ALSA driver
# Copyright (c) 1994-98 by Jaroslav Kysela <perex@suse.cz>
#

TOPDIR   = .

ifeq (Makefile.conf,$(wildcard Makefile.conf))
include Makefile.conf
else
dummy:
	@echo
	@echo "Please, run configure script as first..."
	@echo
endif

SUBDIRS  =
CSUBDIRS =

ifeq (0,$(CONFIG_ISAPNP_KERNEL))
SUBDIRS  += support
endif

SUBDIRS  += kernel lowlevel cards detect
CSUBDIRS += include test utils


all: compile

include/isapnp.h:
	ln -sf ../support/isapnp.h include/isapnp.h

compile: include/isapnp.h cards.config
	@for d in $(SUBDIRS); do if ! $(MAKE) -C $$d; then exit 1; fi; done
	@echo
	@echo "ALSA modules were sucessfully compiled."
	@echo

dep: include/isapnp.h cards.config
	@for d in $(SUBDIRS); do if ! $(MAKE) -C $$d dep; then exit 1; fi; done

cards.config: modules.config
	make -C utils update-deps
	make clean
	./cvscompile
	@echo "You may ignore following error..."
	exit 1

map:
	awk "{ if ( length( $$1 ) != 0 ) print $$1 }" snd.map | sort -o snd.map1
	mv -f snd.map1 snd.map

install: compile
	mkdir -p $(moddir)
	rm -f $(moddir)/snd*.o $(moddir)/persist.o $(moddir)/isapnp.o
	cp modules/*.o $(moddir)
#	/sbin/depmod -a $(kaversion)
	install -m 755 -d $(prefix)/include/linux
	install -m 644 include/asound.h $(prefix)/include/linux
	install -m 644 include/asoundid.h $(prefix)/include/linux
	install -m 644 include/asequencer.h $(prefix)/include/linux
	install -m 644 include/ainstr_simple.h $(prefix)/include/linux
	install -m 644 include/ainstr_gf1.h $(prefix)/include/linux
	install -m 644 include/ainstr_iw.h $(prefix)/include/linux
#	if [ -d /etc/rc.d/init.d ]; then \
#	  if [ -x /etc/rc.d/init.d/alsasound ]; then \
#	    install -m 755 utils/alsasound /etc/rc.d/init.d/alsasound; \
#	  fi \
#	else \
#          if [ -x /etc/init.d ]; then \
#	    install -m 755 utils/alsasound /etc/init.d/alsasound; \
#          fi \
#	fi
	cat WARNING

clean:
	rm -f `find . -name ".depend"`
	@for d in $(SUBDIRS); do if ! $(MAKE) -C $$d clean; then exit 1; fi; done
	@for d in $(CSUBDIRS); do if ! $(MAKE) -C $$d clean; then exit 1; fi; done
	rm -f core .depend *.o snd.map* *~
	rm -f `find . -name "out.txt"`
	rm -f `find . -name "*.orig"`
	rm -f $(DEXPORT)/*.ver
	rm -f modules/*.o
	rm -f doc/*~

mrproper: clean
	rm -f config.cache config.log config.status Makefile.conf
	rm -f utils/alsa-driver.spec

cvsclean: mrproper
	rm -f configure snddevices aclocal.m4 include/config.h include/isapnp.h

pack: mrproper
	chown -R root.root ../alsa-driver
	chmod 755 utils/alsasound
	mv ../alsa-driver ../alsa-driver-$(CONFIG_SND_VERSION)
	tar --exclude=CVS -cvz -C .. -f ../alsa-driver-$(CONFIG_SND_VERSION).tar.gz alsa-driver-$(CONFIG_SND_VERSION)
	mv ../alsa-driver-$(CONFIG_SND_VERSION) ../alsa-driver