source: roaraudio/build-system/Makefile.library @ 5878:3b92b0d6ef9b

Last change on this file since 5878:3b92b0d6ef9b was 5787:bff6c671917e, checked in by phi, 11 years ago

added support to handle ckport databases

File size: 2.5 KB
Line 
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
21RABS_INSTALL_TARGETS += lib
22
23CFLAGS      += $(fPIC) $(SHARED_CF)
24LDFLAGS     += $(SHARED)
25
26ifneq ($(origin COMMON_V_MAJOR), undefined)
27COMMON_SOVERSION ?= $(COMMON_V_MAJOR)
28endif
29
30ifneq ($(origin COMMON_SOVERSION), undefined)
31SOVERSION   ?= $(COMMON_SOVERSION)
32else
33SOVERSION   ?= dummy
34endif
35
36ifneq ($(origin COMMON_VERSION), undefined)
37PC_VERSION  ?= $(COMMON_VERSION)
38else
39PC_VERSION  ?= so$(SOVERSION)
40endif
41
42PC_DESC     ?= DUMMY
43PC_LIBS     += libroar
44
45LIBNAME      = lib$(BASENAME)
46SOLIBNAME    = $(LIBNAME)$(SHARED_SUFFIX)
47SOVLIBNAME   = $(SOLIBNAME).$(SOVERSION)
48ALIBNAME     = $(LIBNAME).a
49PCLIBNAME    = $(LIBNAME).pc
50CKPORTDB     = $(LIBNAME).ckport
51
52TARGETS=$(SOLIBNAME) $(SOVLIBNAME) $(ALIBNAME) $(PCLIBNAME)
53
54include $(ROAR_BUILDSYSTEM_DIR)/Makefile.common
55include $(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)
74ifeq ($(LINK_DEPS),full)
75        echo 'Requires: $(PC_LIBS)' >> $(PCLIBNAME)
76else
77        echo 'Requires.private: $(PC_LIBS)' >> $(PCLIBNAME)
78endif
79        echo 'Libs: -L$${libdir} -l$(BASENAME)' >> $(PCLIBNAME)
80        echo 'Cflags: -I$${includedir}' >> $(PCLIBNAME)
Note: See TracBrowser for help on using the repository browser.