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 | ifneq ($(origin COMMON_V_MAJOR), undefined) |
---|
27 | COMMON_SOVERSION ?= $(COMMON_V_MAJOR) |
---|
28 | endif |
---|
29 | |
---|
30 | ifneq ($(origin COMMON_SOVERSION), undefined) |
---|
31 | SOVERSION ?= $(COMMON_SOVERSION) |
---|
32 | else |
---|
33 | SOVERSION ?= dummy |
---|
34 | endif |
---|
35 | |
---|
36 | ifneq ($(origin COMMON_VERSION), undefined) |
---|
37 | PC_VERSION ?= $(COMMON_VERSION) |
---|
38 | else |
---|
39 | PC_VERSION ?= so$(SOVERSION) |
---|
40 | endif |
---|
41 | |
---|
42 | PC_DESC ?= DUMMY |
---|
43 | PC_LIBS += libroar |
---|
44 | |
---|
45 | LIBNAME = lib$(BASENAME) |
---|
46 | SOLIBNAME = $(LIBNAME)$(SHARED_SUFFIX) |
---|
47 | SOVLIBNAME = $(SOLIBNAME).$(SOVERSION) |
---|
48 | ALIBNAME = $(LIBNAME).a |
---|
49 | PCLIBNAME = $(LIBNAME).pc |
---|
50 | CKPORTDB = $(LIBNAME).ckport |
---|
51 | |
---|
52 | TARGETS=$(SOLIBNAME) $(SOVLIBNAME) $(ALIBNAME) $(PCLIBNAME) |
---|
53 | |
---|
54 | include $(ROAR_BUILDSYSTEM_DIR)/Makefile.common |
---|
55 | include $(ROAR_BUILDSYSTEM_DIR)/Makefile.install |
---|
56 | |
---|
57 | $(SOLIBNAME): $(SOVLIBNAME) |
---|
58 | ln -fs $(SOVLIBNAME) $(SOLIBNAME) |
---|
59 | $(SOVLIBNAME): $(OBJS) |
---|
60 | $(CC) $(LDFLAGS) -Wl,-soname,$(SOVLIBNAME) -o $(SOVLIBNAME) $(OBJS) $(LIBS) |
---|
61 | $(ALIBNAME): $(OBJS) |
---|
62 | $(AR) cru $(ALIBNAME) $(OBJS) |
---|
63 | $(RANLIB) $(ALIBNAME) |
---|
64 | $(PCLIBNAME): |
---|
65 | echo 'prefix=$(PREFIX)' > $(PCLIBNAME) |
---|
66 | echo 'exec_prefix=$${prefix}' >> $(PCLIBNAME) |
---|
67 | echo 'libdir=$(PREFIX_LIB)' >> $(PCLIBNAME) |
---|
68 | echo 'includedir=$(PREFIX_INC)' >> $(PCLIBNAME) |
---|
69 | echo '' >> $(PCLIBNAME) |
---|
70 | echo 'Name: $(LIBNAME)' >> $(PCLIBNAME) |
---|
71 | echo 'Description: $(PC_DESC)' >> $(PCLIBNAME) |
---|
72 | echo 'Version: $(PC_VERSION)' >> $(PCLIBNAME) |
---|
73 | echo 'Conflicts:' >> $(PCLIBNAME) |
---|
74 | ifeq ($(LINK_DEPS),full) |
---|
75 | echo 'Requires: $(PC_LIBS)' >> $(PCLIBNAME) |
---|
76 | else |
---|
77 | echo 'Requires.private: $(PC_LIBS)' >> $(PCLIBNAME) |
---|
78 | endif |
---|
79 | echo 'Libs: -L$${libdir} -l$(BASENAME)' >> $(PCLIBNAME) |
---|
80 | echo 'Cflags: -I$${includedir}' >> $(PCLIBNAME) |
---|