diff options
| author | garyscavone <garyscavone@users.noreply.github.com> | 2016-02-10 10:01:18 -0500 |
|---|---|---|
| committer | garyscavone <garyscavone@users.noreply.github.com> | 2016-02-10 10:01:18 -0500 |
| commit | 9b3b34a70f43d78bf5fb035de46da7cb5789a46d (patch) | |
| tree | a6eccbc6aea5b8640d8008c4f09e7d0c1889f270 | |
| parent | 120350bdb30a9b3b70f8fe0502824e4f040b7635 (diff) | |
| parent | 58f85d4372c6efbf8974904ed3a5f428248dfdfb (diff) | |
Merge pull request #63 from radarsat1/install-stuff
Install stuff
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile.am | 16 | ||||
| -rwxr-xr-x | autogen.sh | 26 | ||||
| -rw-r--r-- | configure.ac | 18 | ||||
| -rw-r--r-- | doc/Makefile.am | 33 | ||||
| -rw-r--r-- | rtmidi.pc.in (renamed from librtmidi.pc.in) | 2 | ||||
| -rw-r--r-- | tests/Makefile.am | 22 | ||||
| -rw-r--r-- | tests/Makefile.in | 49 |
8 files changed, 107 insertions, 61 deletions
@@ -5,3 +5,5 @@ /autom4te.cache /configure /m4 +/doc/Makefile.in +/tests/Makefile.in diff --git a/Makefile.am b/Makefile.am index 706daf0..2382ae4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,21 @@ +SUBDIRS = . tests +if MAKE_DOC +SUBDIRS += doc +endif + lib_LTLIBRARIES = %D%/librtmidi.la %C%_librtmidi_la_LDFLAGS = -no-undefined %C%_librtmidi_la_SOURCES = \ %D%/RtMidi.cpp \ + %D%/rtmidi_c.cpp + +rtmidi_incdir = $(includedir)/rtmidi +rtmidi_inc_HEADERS = \ %D%/RtMidi.h \ - %D%/rtmidi_c.cpp \ %D%/rtmidi_c.h + +pkgconfigdatadir = $(libdir)/pkgconfig +pkgconfigdata_DATA = rtmidi.pc + +EXTRA_DIST = autogen.sh readme msw + @@ -6,12 +6,24 @@ test -z "$srcdir" && srcdir=. DIE=0 +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with arguments for" + echo "developer/maintainer mode. If you wish to pass extra arguments," + echo "(such as --prefix), please specify them on the \`$0'" + echo "command line." + echo "If you wish to run configure yourself, please specify --no-configure." + echo +fi + (test -f $srcdir/configure.ac) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } +if ! autoreconf --version </dev/null >/dev/null 2>&1 +then + (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." @@ -55,13 +67,6 @@ if test "$DIE" -eq 1; then exit 1 fi -if test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo -fi - # Make some directories required by automake, if they don't exist if ! [ -d config ]; then mkdir -v config; fi if ! [ -d m4 ]; then mkdir -v m4; fi @@ -80,6 +85,13 @@ automake --add-missing --gnu $am_opt || exit 1 echo "Running autoconf ..." autoconf || exit 1 +else # autoreconf instead + + echo "Running autoreconf --verbose --install ..." + autoreconf --verbose --install || exit 1 + +fi + if ( echo "$@" | grep -q -e "--no-configure" ); then NOCONFIGURE=1 fi diff --git a/configure.ac b/configure.ac index 6038314..58cf117 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ AC_INIT(RtMidi, 2.1.1, gary@music.mcgill.ca, rtmidi) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtMidi.cpp) -AC_CONFIG_FILES([rtmidi-config librtmidi.pc Makefile tests/Makefile]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile doc/Makefile]) +AM_INIT_AUTOMAKE([1.14 -Wall -Werror foreign subdir-objects]) # Enable some nice automake features if they are available m4_ifdef([AM_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) @@ -38,7 +38,7 @@ AC_ARG_ENABLE(debug, # Set paths if prefix is defined if test "x$prefix" != "x" && test "x$prefix" != "xNONE"; then LIBS="$LIBS -L$prefix/lib" - CPPFLAGS="$CPPFLAGS -I$prefix/include" + CPPFLAGS="$CPPFLAGS -I$prefix/include/rtmidi" fi # For -I and -D flags @@ -55,6 +55,18 @@ fi CXXFLAGS="$CXXFLAGS $cxxflag" +# Checks for doxygen +AC_CHECK_PROG( DOXYGEN, [doxygen], [doxygen] ) +AM_CONDITIONAL( MAKE_DOC, [test "x${DOXYGEN}" != x] ) + +# Copy doc files to build dir if necessary +AC_CONFIG_LINKS( [doc/doxygen/Doxyfile:doc/doxygen/Doxyfile] ) +AC_CONFIG_LINKS( [doc/doxygen/footer.html:doc/doxygen/footer.html] ) +AC_CONFIG_LINKS( [doc/doxygen/header.html:doc/doxygen/header.html] ) +AC_CONFIG_LINKS( [doc/doxygen/tutorial.txt:doc/doxygen/tutorial.txt] ) +AC_CONFIG_LINKS( [doc/images/ccrma.gif:doc/images/ccrma.gif] ) +AC_CONFIG_LINKS( [doc/images/mcgill.gif:doc/images/mcgill.gif] ) + # Checks for package options and external software AC_CANONICAL_HOST diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..b670116 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,33 @@ + +MAINTAINERCLEANFILES=Makefile.in + +CLEANFILES=doxygen-build.stamp + +DOX=Doxyfile + +EXTRA_DIST=html + +INSTIMAGES=html/doxygen.png + +DOC_STAMPS=doxygen-build.stamp + +DOC_DIR=$(HTML_DIR) + +all-local: doxygen-build.stamp + +doxygen-build.stamp: doxygen/$(DOX) $(top_srcdir)/RtMidi.h $(top_srcdir)/rtmidi_c.h + @echo '*** Running doxygen ***' + cd doxygen; $(DOXYGEN) $(DOX) + touch doxygen-build.stamp + +clean-local: + rm -f *~ *.bak $(DOC_STAMPS) || true + if test -d html; then rm -fr html; fi + if test -d latex; then rm -fr latex; fi + if test -d man; then rm -fr man; fi + +distclean-local: clean + rm -f *.stamp || true + if test -d html; then rm -rf html; fi + +html-local: $(DOC_STAMPS) diff --git a/librtmidi.pc.in b/rtmidi.pc.in index d309906..c94652b 100644 --- a/librtmidi.pc.in +++ b/rtmidi.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib -includedir=${prefix}/include +includedir=${prefix}/include/rtmidi Name: librtmidi Description: RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..b6bdcec --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,22 @@ + +noinst_PROGRAMS = midiprobe midiout qmidiin cmidiin sysextest + +midiprobe_CXXFLAGS = -Wall -I$(top_srcdir) +midiprobe_SOURCES = midiprobe.cpp +midiprobe_LDADD = $(top_builddir)/librtmidi.la + +midiout_CXXFLAGS = -Wall -I$(top_srcdir) +midiout_SOURCES = midiout.cpp +midiout_LDADD = $(top_builddir)/librtmidi.la + +qmidiin_CXXFLAGS = -Wall -I$(top_srcdir) +qmidiin_SOURCES = qmidiin.cpp +qmidiin_LDADD = $(top_builddir)/librtmidi.la + +cmidiin_CXXFLAGS = -Wall -I$(top_srcdir) +cmidiin_SOURCES = cmidiin.cpp +cmidiin_LDADD = $(top_builddir)/librtmidi.la + +sysextest_CXXFLAGS = -Wall -I$(top_srcdir) +sysextest_SOURCES = sysextest.cpp +sysextest_LDADD = $(top_builddir)/librtmidi.la diff --git a/tests/Makefile.in b/tests/Makefile.in deleted file mode 100644 index 42cb354..0000000 --- a/tests/Makefile.in +++ /dev/null @@ -1,49 +0,0 @@ -### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in -### RtMidi tests Makefile - for various flavors of unix - -PROGRAMS = midiprobe midiout qmidiin cmidiin sysextest -RM = /bin/rm -SRC_PATH = .. -INCLUDE = @top_srcdir@ -OBJECT_PATH = @object_path@ -vpath %.o $(OBJECT_PATH) - -OBJECTS = @top_srcdir@/RtMidi.o - -CC = @CXX@ -DEFS = @CPPFLAGS@ -CFLAGS = @CXXFLAGS@ -CFLAGS += -I$(INCLUDE) -I$(INCLUDE)/include -LIBRARY = @LIBS@ - -%.o : $(SRC_PATH)/%.cpp - $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@ - -all : $(PROGRAMS) - -midiprobe : @srcdir@/midiprobe.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o midiprobe $^ $(LIBRARY) - -midiout : @srcdir@/midiout.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o midiout $^ $(LIBRARY) - -qmidiin : @srcdir@/qmidiin.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o qmidiin $^ $(LIBRARY) - -cmidiin : @srcdir@/cmidiin.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o cmidiin $^ $(LIBRARY) - -sysextest : @srcdir@/sysextest.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o sysextest $^ $(LIBRARY) - -clean : - $(RM) -f $(OBJECT_PATH)/*.o - $(RM) -f $(PROGRAMS) *.exe - $(RM) -f *~ - $(RM) -fR *.dSYM - -distclean: clean - $(RM) -f Makefile - -strip : - strip $(PROGRAMS) |
