1219820Sjeff
2219820SjeffSUBDIRS = .
3219820Sjeff
4219820Sjeffif DEBUG
5219820SjeffDBGFLAGS = -ggdb -D_DEBUG_
6219820Sjeffelse
7219820SjeffDBGFLAGS = -g
8219820Sjeffendif
9219820Sjeff
10219820SjeffINCLUDES = $(OSMV_INCLUDES)
11219820Sjeff
12219820Sjefflib_LTLIBRARIES = libosmvendor.la
13219820Sjeff
14219820Sjefflibosmvendor_la_CFLAGS = -Wall $(DBGFLAGS)
15219820Sjeff
16219820Sjeffif HAVE_LD_VERSION_SCRIPT
17219820Sjeff    libosmvendor_version_script = -Wl,--version-script=$(srcdir)/libosmvendor.map
18219820Sjeffelse
19219820Sjeff    libosmvendor_version_script =
20219820Sjeffendif
21219820Sjeff
22219820Sjeffosmvendor_api_version=$(shell grep LIBVERSION= $(srcdir)/libosmvendor.ver | sed 's/LIBVERSION=//')
23219820Sjeff
24219820SjeffCOMM_HDRS= $(srcdir)/../include/vendor/osm_vendor_api.h \
25219820Sjeff			$(srcdir)/../include/vendor/osm_vendor.h \
26219820Sjeff			$(srcdir)/../include/vendor/osm_vendor_sa_api.h
27219820Sjeff
28219820Sjeffif OSMV_OPENIB
29219820Sjefflibosmvendor_la_SOURCES = osm_vendor_ibumad.c \
30219820Sjeff			  osm_vendor_ibumad_sa.c
31219820SjeffHDRS =$(COMM_HDRS) $(srcdir)/../include/vendor/osm_vendor_ibumad.h
32219820Sjeffendif
33219820Sjeffif OSMV_SIM
34219820Sjefflibosmvendor_la_SOURCES = osm_vendor_mlx.c \
35219820Sjeff		osm_vendor_mlx_sim.c \
36219820Sjeff		osm_vendor_mlx_hca_sim.c \
37219820Sjeff		osm_vendor_mlx_dispatcher.c \
38219820Sjeff		osm_vendor_mlx_rmpp_ctx.c \
39219820Sjeff		osm_vendor_mlx_sar.c \
40219820Sjeff		osm_vendor_mlx_sender.c \
41219820Sjeff		osm_vendor_mlx_txn.c \
42219820Sjeff		osm_vendor_mlx_sa.c \
43219820Sjeff		osm_pkt_randomizer.c
44219820SjeffHDRS =$(COMM_HDRS) $(srcdir)/../include/vendor/osm_vendor_mlx.h \
45219820Sjeff	$(srcdir)/../include/vendor/osm_pkt_randomizer.h
46219820Sjeffendif
47219820Sjeffif OSMV_GEN1
48219820Sjefflibosmvendor_la_SOURCES = osm_vendor_mlx.c \
49219820Sjeff		osm_pkt_randomizer.c \
50219820Sjeff		osm_vendor_mlx_hca.c \
51219820Sjeff		osm_vendor_mlx_dispatcher.c \
52219820Sjeff		osm_vendor_mlx_rmpp_ctx.c \
53219820Sjeff		osm_vendor_mlx_sar.c \
54219820Sjeff		osm_vendor_mlx_sender.c \
55219820Sjeff		osm_vendor_mlx_ts.c \
56219820Sjeff		osm_vendor_mlx_txn.c \
57219820Sjeff		osm_vendor_mlx_sa.c
58219820SjeffHDRS =$(COMM_HDRS) $(srcdir)/../include/vendor/osm_vendor_mlx.h \
59219820Sjeff	$(srcdir)/../include/vendor/osm_pkt_randomizer.h
60219820Sjeffendif
61219820Sjeffif OSMV_VAPI
62219820Sjefflibosmvendor_la_SOURCES = osm_vendor_mlx.c \
63219820Sjeff		osm_pkt_randomizer.c \
64219820Sjeff		osm_vendor_mlx_hca.c \
65219820Sjeff		osm_vendor_mlx_dispatcher.c \
66219820Sjeff		osm_vendor_mlx_rmpp_ctx.c \
67219820Sjeff		osm_vendor_mlx_sar.c \
68219820Sjeff		osm_vendor_mlx_sender.c \
69219820Sjeff		osm_vendor_mlx_ibmgt.c \
70219820Sjeff		osm_vendor_mlx_txn.c \
71219820Sjeff		osm_vendor_mlx_sa.c
72219820SjeffHDRS =$(COMM_HDRS) $(srcdir)/../include/vendor/osm_vendor_mlx.h \
73219820Sjeff	$(srcdir)/../include/vendor/osm_pkt_randomizer.h
74219820Sjeffendif
75219820Sjeff
76219820Sjefflibosmvendor_la_LIBADD = -L../complib -losmcomp
77219820Sjefflibosmvendor_la_LDFLAGS = -version-info $(osmvendor_api_version) \
78219820Sjeff	-export-dynamic $(libosmvendor_version_script)
79219820Sjefflibosmvendor_la_DEPENDENCIES = $(srcdir)/libosmvendor.map
80219820Sjeff
81219820Sjefflibosmvendorincludedir = $(includedir)/infiniband/vendor
82219820Sjeff
83219820Sjefflibosmvendorinclude_HEADERS = $(HDRS)
84219820Sjeff
85219820Sjeff# headers are distributed as part of the include dir
86219820SjeffEXTRA_DIST = $(srcdir)/libosmvendor.map $(srcdir)/libosmvendor.ver
87