~ubuntu-branches/ubuntu/precise/corosync/precise-proposed

« back to all changes in this revision

Viewing changes to lcr/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2009-08-21 09:29:56 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090821092956-w9qxxxx3zeoh8dem
Tags: 1.0.0-4ubuntu2
* debian/control:
  - 'Ubuntu Developers' instead of 'Ubuntu Core Developers'
    as maintainer
  - Bump debhelper dependecy to 7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Redistribution and use in source and binary forms, with or without
2
 
# modification, are permitted provided that the following conditions are met:
3
 
4
 
# - Redistributions of source code must retain the above copyright notice,
5
 
#   this list of conditions and the following disclaimer.
6
 
# - Redistributions in binary form must reproduce the above copyright notice,
7
 
#   this list of conditions and the following disclaimer in the documentation
8
 
#   and/or other materials provided with the distribution.
9
 
# - Neither the name of the MontaVista Software, Inc. nor the names of its
10
 
#   contributors may be used to endorse or promote products derived from this
11
 
#   software without specific prior written permission.
12
 
#
13
 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14
 
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
 
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
17
 
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 
# THE POSSIBILITY OF SUCH DAMAGE.
24
 
 
25
 
# Include configuration
26
 
#
27
 
include ../Makefile.inc
28
 
 
29
 
override LDFLAGS += -L./ ${DYFLAGS}
30
 
 
31
 
ifeq (${COROSYNC_COMPAT}, LINUX) 
32
 
        LDFLAGS += -ldl
33
 
endif
34
 
 
35
 
ifeq (${COROSYNC_COMPAT}, SOLARIS)
36
 
        override LDFLAGS += -lnsl -lsocket
37
 
endif
38
 
 
39
 
all:liblcr.a test test_static uic libtest_a.lcrso libtest_b.lcrso
40
 
 
41
 
liblcr.a: lcr_ifact.o
42
 
        $(AR) -rc liblcr.a lcr_ifact.o
43
 
 
44
 
ifeq (${COROSYNC_COMPAT}, DARWIN)
45
 
 
46
 
libtest_a.lcrso: libtest_a.o
47
 
        $(CC) $(CFLAGS) -bundle -bundle_loader ./test libtest_a.o -o $@
48
 
 
49
 
libtest_b.lcrso: libtest_b.o
50
 
        $(CC) $(CFLAGS) -bundle -bundle_loader ./test libtest_b.o -o $@
51
 
 
52
 
else
53
 
 
54
 
libtest_a.lcrso: libtest_a.o
55
 
        $(CC) $(CFLAGS) -shared -Wl,-soname,libtest_b.lcrso libtest_a.o -o $@
56
 
 
57
 
libtest_b.lcrso: libtest_b.o
58
 
        $(CC) $(CFLAGS) -shared -Wl,-soname,libtest_b.lcrso libtest_b.o -o $@
59
 
 
60
 
endif
61
 
        
62
 
test: test.o uis.o lcr_ifact.o
63
 
        $(CC) $(LDFLAGS) -fPIC test.o lcr_ifact.o uis.o -lpthread -o test
64
 
 
65
 
test_static: test.o libtest_a.o libtest_b.o uis.o lcr_ifact.o
66
 
        $(CC) $(LDFLAGS) test.o libtest_a.o libtest_b.o lcr_ifact.o -o test_static
67
 
 
68
 
uic: uic.o
69
 
        $(CC) $(LDFLAGS) uic.o -o uic
70
 
 
71
 
libtest_a.o: libtest_a.c
72
 
        $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
73
 
 
74
 
libtest_b.o: libtest_b.c
75
 
        $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
76
 
 
77
 
lcr_ifact.o: lcr_ifact.c
78
 
        $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
79
 
 
80
 
test.o: test.c
81
 
        $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
82
 
 
83
 
clean:
84
 
        rm -f test libtest.so* *.o uic liblcr.so* liblcr.a *.lcrso *.da *.ba *.bb *.bbg \
85
 
        test_static
86