summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2016-10-04 16:10:01 -0500
committerMatthew Barth <msbarth@us.ibm.com>2016-11-09 09:15:59 -0600
commit7122244c83092499dc8d7836da0a63a08c734856 (patch)
treeb95c9fe7b681a683b1028c8560ea81bd3f8c7a93 /Makefile.am
parent36eb1e52265f2c765d0f0c56914841a1e2f54fe5 (diff)
downloadphosphor-objmgr-7122244c83092499dc8d7836da0a63a08c734856.tar.gz
phosphor-objmgr-7122244c83092499dc8d7836da0a63a08c734856.zip
Convert build process to autotools
Replaced the use of a manual Makefile with the use of autotools to automatically verify and generate the necessary build files. Follow the steps outlined within the README.md file to build the package. Change-Id: Id7be6220d32e457b1171d5d98123c6d8f317b380 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am36
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..3aa8cf8
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,36 @@
+sbin_PROGRAMS = mapper
+
+mapper_SOURCES = libmapper/app.c
+mapper_LDFLAGS = $(SYSTEMD_LIBS)
+mapper_CFLAGS = $(SYSTEMD_CFLAGS)
+mapper_LDADD = libmapper.la
+
+libmapperdir = ${libdir}
+libmapper_LTLIBRARIES = libmapper.la
+libmapper_la_SOURCES = libmapper/mapper.c
+libmapper_la_LDFLAGS = $(SYSTEMD_LIBS) -version-info 1:0:0 -shared
+libmapper_la_CFLAGS = $(SYSTEMD_CFLAGS)
+
+oldinclude_HEADERS = libmapper/mapper.h
+
+if HAVE_PYTHON
+
+all-local:
+ $(AM_V_at)$(PYTHON) ${top_builddir}/setup.py build
+
+clean-local:
+ rm -rfv ${top_builddir}/build
+
+install-exec-hook:
+ $(AM_V_at)$(PYTHON) ${top_builddir}/setup.py install \
+ --prefix=$(DESTDIR)${prefix} \
+ --install-data=$(DESTDIR)${datadir} \
+ --install-lib=$(DESTDIR)$(PYTHONDIR) \
+ --install-scripts=$(DESTDIR)${sbindir} \
+ --record=${top_builddir}/python_install.log
+
+uninstall-hook:
+ cat ${top_builddir}/python_install.log \
+ | awk '{print "$(DESTDIR)"$$1}' | xargs rm -fv
+
+endif
OpenPOWER on IntegriCloud