1 | # Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2012 |
---|
2 | # |
---|
3 | # This file is part of roard a part of RoarAudio, |
---|
4 | # a cross-platform sound system for both, home and professional use. |
---|
5 | # See README for details. |
---|
6 | # |
---|
7 | # This file is free software; you can redistribute it and/or modify |
---|
8 | # it under the terms of the GNU General Public License version 3 |
---|
9 | # as published by the Free Software Foundation. |
---|
10 | # |
---|
11 | # RoarAudio is distributed in the hope that it will be useful, |
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | # GNU General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public License |
---|
17 | # along with this software; see the file COPYING. If not, write to |
---|
18 | # the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
19 | # Boston, MA 02110-1301, USA. |
---|
20 | |
---|
21 | RABS_INSTALL_TARGETS += lib |
---|
22 | |
---|
23 | CFLAGS += $(fPIC) $(SHARED_CF) |
---|
24 | LDFLAGS += $(SHARED) |
---|
25 | |
---|
26 | SOVERSION ?= dummy |
---|
27 | |
---|
28 | PC_VERSION ?= so$(SOVERSION) |
---|
29 | PC_DESC ?= DUMMY |
---|
30 | PC_LIBS += libroar |
---|
31 | |
---|
32 | LIBNAME = lib$(BASENAME) |
---|
33 | SOLIBNAME = $(LIBNAME)$(SHARED_SUFFIX) |
---|
34 | SOVLIBNAME = $(SOLIBNAME).$(SOVERSION) |
---|
35 | ALIBNAME = $(LIBNAME).a |
---|
36 | PCLIBNAME = $(LIBNAME).pc |
---|
37 | |
---|
38 | TARGETS=$(SOLIBNAME) $(SOVLIBNAME) $(ALIBNAME) $(PCLIBNAME) |
---|
39 | |
---|
40 | include $(ROAR_BUILDSYSTEM_DIR)/Makefile.common |
---|
41 | include $(ROAR_BUILDSYSTEM_DIR)/Makefile.install |
---|
42 | |
---|
43 | $(SOLIBNAME): $(SOVLIBNAME) |
---|
44 | ln -fs $(SOVLIBNAME) $(SOLIBNAME) |
---|
45 | $(SOVLIBNAME): $(OBJS) |
---|
46 | $(CC) $(LDFLAGS) -Wl,-soname,$(SOVLIBNAME) -o $(SOVLIBNAME) $(OBJS) $(LIBS) |
---|
47 | $(ALIBNAME): $(OBJS) |
---|
48 | $(AR) cru $(ALIBNAME) $(OBJS) |
---|
49 | $(RANLIB) $(ALIBNAME) |
---|
50 | $(PCLIBNAME): |
---|
51 | echo 'prefix=$(PREFIX)' > $(PCLIBNAME) |
---|
52 | echo 'exec_prefix=$${prefix}' >> $(PCLIBNAME) |
---|
53 | echo 'libdir=$(PREFIX_LIB)' >> $(PCLIBNAME) |
---|
54 | echo 'includedir=$(PREFIX_INC)' >> $(PCLIBNAME) |
---|
55 | echo '' >> $(PCLIBNAME) |
---|
56 | echo 'Name: $(LIBNAME)' >> $(PCLIBNAME) |
---|
57 | echo 'Description: $(PC_DESC)' >> $(PCLIBNAME) |
---|
58 | echo 'Version: $(PC_VERSION)' >> $(PCLIBNAME) |
---|
59 | echo 'Conflicts:' >> $(PCLIBNAME) |
---|
60 | ifeq ($(LINK_DEPS),full) |
---|
61 | echo 'Requires: $(PC_LIBS)' >> $(PCLIBNAME) |
---|
62 | else |
---|
63 | echo 'Requires.private: $(PC_LIBS)' >> $(PCLIBNAME) |
---|
64 | endif |
---|
65 | echo 'Libs: -L$${libdir} -l$(BASENAME)' >> $(PCLIBNAME) |
---|
66 | echo 'Cflags: -I$${includedir}' >> $(PCLIBNAME) |
---|