1
# Copyright (C) 2003-2010 Fons Adriaensen <fons@kokkinizita.net>
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
27
VERSION = $(MAJVERS).$(MINVERS)
30
CPPFLAGS += -Wall -I. -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
32
LDLIBS += -lclalsadrv -lclthreads -lrt
35
CLALSADRV_SO = libclalsadrv.so
36
CLALSADRV_MAJ = $(CLALSADRV_SO).$(MAJVERS)
37
CLALSADRV_MIN = $(CLALSADRV_MAJ).$(MINVERS)
38
CLALSADRV_DEP = -lasound
39
CLALSADRV_O = clalsadrv.o
40
CLALSADRV_H = clalsadrv.h
43
$(CLALSADRV_MIN): $(CLALSADRV_O)
44
g++ -shared $(LDFLAGS) -Wl,-soname,$(CLALSADRV_MAJ) -o $(CLALSADRV_MIN) $(CLALSADRV_O) $(CLALSADRV_DEP)
47
install: $(CLALSADRV_MIN)
48
install -Dm 644 $(CLALSADRV_H) $(DESTDIR)$(PREFIX)/include/$(CLALSADRV_H)
49
install -Dm 755 $(CLALSADRV_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLALSADRV_MIN)
50
/sbin/ldconfig $(PREFIX)/$(LIBDIR)
51
ln -sf $(CLALSADRV_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLALSADRV_SO)
54
/bin/rm -f *~ *.o *.a *.d *.so.*