~ubuntu-branches/ubuntu/saucy/ibutils/saucy

« back to all changes in this revision

Viewing changes to .pc/03-remove-rpath.patch/ibmgtsim/src/Makefile.am

  • Committer: Package Import Robot
  • Author(s): Roland Dreier
  • Date: 2012-12-03 11:45:32 UTC
  • Revision ID: package-import@ubuntu.com-20121203114532-zz0zk41tw0hzdy7w
Tags: 1.5.7-1
* Acknowledge NMU. (Closes: #690603)
* Convert to minimized rules file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#--
 
2
# Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
 
3
#
 
4
# This software is available to you under a choice of one of two
 
5
# licenses.  You may choose to be licensed under the terms of the GNU
 
6
# General Public License (GPL) Version 2, available from the file
 
7
# COPYING in the main directory of this source tree, or the
 
8
# OpenIB.org BSD license below:
 
9
#
 
10
#     Redistribution and use in source and binary forms, with or
 
11
#     without modification, are permitted provided that the following
 
12
#     conditions are met:
 
13
#
 
14
#      - Redistributions of source code must retain the above
 
15
#        copyright notice, this list of conditions and the following
 
16
#        disclaimer.
 
17
#
 
18
#      - Redistributions in binary form must reproduce the above
 
19
#        copyright notice, this list of conditions and the following
 
20
#        disclaimer in the documentation and/or other materials
 
21
#        provided with the distribution.
 
22
#
 
23
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
24
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
25
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 
26
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 
27
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 
28
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
29
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 
30
# SOFTWARE.
 
31
#--
 
32
 
 
33
## Makefile.am -- Process this file with automake to produce Makefile.in
 
34
 
 
35
# Support debug mode through config variable
 
36
if DEBUG
 
37
DBG = -O0 -g -Wall
 
38
else
 
39
DBG = -O2 -Wall
 
40
endif
 
41
 
 
42
AM_CXXFLAGS = $(DBG) $(OSM_CFLAGS)
 
43
 
 
44
if IBDM_REF_IS_USED
 
45
INCLUDES                = -I$(with_ibdm)/ibdm $(TCL_CPPFLAGS)
 
46
else
 
47
INCLUDES                = -I$(with_ibdm)/include $(TCL_CPPFLAGS)
 
48
endif
 
49
 
 
50
 
 
51
bin_PROGRAMS = ibmssh ibmsquit #ibmgtsim test_msgmgr test_client test_server ibmgt_client
 
52
 
 
53
if IBDM_REF_IS_USED
 
54
# we assume we are building a parallel tree
 
55
IBDM_PREFIX=$prefix
 
56
IBDM_LIB=-L../../ibdm/ibdm -libdmcom
 
57
IBDM_INC=-I$(srcdir)/../../ibdm/ibdm
 
58
IBDM_IFC=$(srcdir)/../../ibdm/ibdm/ibdm.i
 
59
else
 
60
IBDM_PREFIX=$(with_ibdm)
 
61
IBDM_LIB=-L$(with_ibdm)/lib -libdmcom
 
62
IBDM_INC=-I$(with_ibdm)/include/ibdm
 
63
IBDM_IFC=$(with_ibdm)/include/ibdm/ibdm.i
 
64
endif
 
65
 
 
66
AM_CPPFLAGS = -I$(INCLUDES) $(IBDM_INC) $(OSM_CFLAGS)
 
67
LDADD = $(IBDM_LIB) -lpthread
 
68
 
 
69
# AM_LDFLAGS = -static
 
70
 
 
71
# this is the main simulator
 
72
#ibmgtsim_SOURCES = sim.cpp server.cpp node.cpp dispatcher.cpp \
 
73
#       msgmgr.cpp simmsg.cpp tcpcomm.cpp sma.cpp pma.cpp
 
74
#ibmgtsim_CPPFLAGS = -DBUILD_STANDALONE_SIM=1
 
75
 
 
76
ibmssh_SOURCES = sim.cpp server.cpp node.cpp dispatcher.cpp \
 
77
         ibmssh_wrap.cpp sma.cpp pma.cpp vsa.cpp randmgr.cpp
 
78
 
 
79
ibmssh_LDFLAGS = -static -Wl,-rpath -Wl,$(TCL_PREFIX)/lib \
 
80
        -Wl,-rpath -Wl,$(IBDM_PREFIX)/lib
 
81
 
 
82
ibmssh_LDADD = -libmscli $(IBDM_LIB) $(TCL_LIBS) -lpthread
 
83
 
 
84
ibmssh_DEPENDENCIES = libibmscli.la
 
85
 
 
86
# SWIG FILES:
 
87
SWIG_IFC_FILES= $(srcdir)/sim.i $(srcdir)/ib_types.i $(IBDM_IFC) \
 
88
   $(srcdir)/inttypes.i $(srcdir)/mads.i
 
89
 
 
90
#$(srcdir)/sim.cpp: $(srcdir)/git_version.h
 
91
sim.o: $(srcdir)/git_version.h
 
92
 
 
93
# track latest GIT version for this tree:
 
94
GIT=$(shell which git)
 
95
 
 
96
$(srcdir)/git_version.h:  @MAINTAINER_MODE_TRUE@ FORCE
 
97
        if test x$(GIT) != x ; then \
 
98
           gitver=`cd $(srcdir) ; git rev-parse --verify HEAD`; \
 
99
           changes=`cd $(srcdir) ; git diff . | grep ^diff | wc -l`; \
 
100
        else \
 
101
           gitver=undefined; changes=0; \
 
102
        fi ; \
 
103
        if test $$changes != 0; then gitver="$$gitver with-local-mods"; fi; \
 
104
        echo "#define IBMGTSIM_CODE_VERSION \"$$gitver\"" > .git_version.h ;\
 
105
        if test -f $(srcdir)/git_version.h ; then \
 
106
                if test `diff .git_version.h $(srcdir)/git_version.h | wc -l` != 0; then \
 
107
                        mv -f .git_version.h $(srcdir)/git_version.h; \
 
108
                        echo "Updated code version to: $$gitver"; \
 
109
                fi; \
 
110
        else \
 
111
                mv -f .git_version.h $(srcdir)/git_version.h; \
 
112
                echo "Created code version file with version: $$gitver"; \
 
113
        fi;
 
114
 
 
115
FORCE:
 
116
 
 
117
 
 
118
# only generate the swig wrappers if they do not exist...
 
119
# so we avoid un-needed swig dependency
 
120
if HAS_SWIG
 
121
$(srcdir)/ibms_wrap.cpp: @MAINTAINER_MODE_TRUE@ $(SWIG_IFC_FILES)
 
122
        swig -I$(srcdir) $(IBDM_INC) -c++ -dhtml -tcl8 -o swig_wrap.c $(srcdir)/sim.i
 
123
        $(srcdir)/../utils/fixSwigWrapper -g -s -p -o $@
 
124
        rm -f swig_wrap.c
 
125
 
 
126
$(srcdir)/ibmssh_wrap.cpp: @MAINTAINER_MODE_TRUE@ $(SWIG_IFC_FILES)
 
127
        swig -I$(srcdir) $(IBDM_INC) -c++ -dhtml -tcl8  -ltclsh.i -o swig_wrap.c $(srcdir)/sim.i
 
128
        $(srcdir)/../utils/fixSwigWrapper -g -s -p -r ibms -o $@
 
129
        rm -f swig_wrap.c
 
130
endif
 
131
 
 
132
swigclean:
 
133
        rm -f $(srcdir)/ibms_wrap.cpp $(srcdir)/ibmssh_wrap.cpp *wrap.o
 
134
 
 
135
# we need there extra in the distribution as their dependency is not defined
 
136
EXTRA_DIST = swig_alternate_mangling.cpp
 
137
 
 
138
# Quiter for the server
 
139
ibmsquit_SOURCES = client.cpp msgmgr.cpp simmsg.cpp tcpcomm.cpp
 
140
ibmsquit_CPPFLAGS = -DBUILD_QUIT_CLIENT=1 -I$(INCLUDES)
 
141
 
 
142
# tester of the client code
 
143
#ibmgt_client_SOURCES = client.cpp msgmgr.cpp simmsg.cpp tcpcomm.cpp
 
144
#ibmgt_client_CPPFLAGS = -DBUILD_TEST_CLIENT=1
 
145
 
 
146
# simple client program for testing
 
147
#test_client_SOURCES = tcpcomm.cpp msgmgr.cpp
 
148
#test_client_CPPFLAGS = -DBUILD_TCP_COMM_CLIENT=1
 
149
 
 
150
# simple server program for testing
 
151
#test_server_SOURCES = tcpcomm.cpp msgmgr.cpp
 
152
#test_server_CPPFLAGS = -DBUILD_TCP_COMM_SERVER=1
 
153
 
 
154
# testing message manager
 
155
#test_msgmgr_SOURCES = msgmgr.cpp simmsg.cpp
 
156
#test_msgmgr_CPPFLAGS = -DMSG_MGR_TEST=1
 
157
 
 
158
# client library to be used by OSMV type sim:
 
159
 
 
160
# ibms shared library version triplet is:
 
161
# API_ID:API_VER:NUM_PREV_API_SUP = x:y:z
 
162
# * change of API_ID means new API
 
163
# * change of AGE means how many API backward compt
 
164
# * change of API_VER is required every version
 
165
# Results with SO version: x-z:z:y
 
166
LIB_VER_TRIPLET="1:0:0"
 
167
LIB_FILE_TRIPLET=1.0.0
 
168
 
 
169
lib_LTLIBRARIES = libibmscli.la
 
170
 
 
171
libibmscli_la_SOURCES = client.cpp simmsg.cpp msgmgr.cpp tcpcomm.cpp
 
172
#  -Wl,-rpath -Wl,$(TCL_PREFIX)/lib
 
173
libibmscli_la_LDFLAGS = -version-info $(LIB_VER_TRIPLET) -no-undefined
 
174
 
 
175
# we would like to export these headers during install
 
176
pkginclude_HEADERS = $(wildcard $(srcdir)/*.h)
 
177
 
 
178
# Don't distribute common.h, since it is build host dependent!
 
179
#dist-hook:
 
180
#       rm -f $(distdir)/common.h