1
2# note that order matters: make the libs first then use them
3SUBDIRS = complib libvendor opensm osmtest include $(DEFAULT_EVENT_PLUGIN)
4DIST_SUBDIRS = complib libvendor opensm osmtest include osmeventplugin
5
6ACLOCAL_AMFLAGS = -I config
7
8# we should provide a hint for other apps about the build mode of this project
9install-exec-hook:
10	mkdir -p $(DESTDIR)/$(includedir)
11if DEBUG
12	echo "define osm_build_type \"debug\"" > $(DESTDIR)/$(includedir)/infiniband/opensm/osm_build_id.h
13else
14	echo "define osm_build_type \"free\"" > $(DESTDIR)/$(includedir)/infiniband/opensm/osm_build_id.h
15endif
16	$(top_srcdir)/config/install-sh -m 755 -d $(DESTDIR)/$(sysconfdir)/init.d
17	cp $(top_builddir)/scripts/opensm.init $(DESTDIR)/$(sysconfdir)/init.d/opensmd
18	chmod 755 $(DESTDIR)/$(sysconfdir)/init.d/opensmd
19
20
21man_MANS = man/opensm.8 man/osmtest.8
22
23various_scripts = $(wildcard scripts/*)
24docs = doc/performance-manager-HOWTO.txt doc/QoS_management_in_OpenSM.txt \
25	doc/opensm_release_notes-3.2.txt
26
27EXTRA_DIST = autogen.sh opensm.spec $(various_scripts) $(man_MANS) $(docs)
28
29dist-hook: $(EXTRA_DIST)
30	if [ -x $(top_srcdir)/../gen_chlog.sh ] ; then \
31		cd $(top_srcdir)/.. ; ./gen_chlog.sh $(PACKAGE) > $(distdir)/ChangeLog ; cd - ; \
32	fi
33