Start using libraries to be able to compile other people's or automatically generated sources using standard compilation settings.

This commit is contained in:
Mike Brady
2018-10-30 19:49:32 +00:00
parent 3fbe2e60cd
commit b91df8ec73
3 changed files with 20 additions and 4 deletions
+1
View File
@@ -32,6 +32,7 @@ shairport-sync.core
/org.gnome.ShairportSync.service
/dbus-interface.*
/mpris-interface.*
/lib_*.*
# Some eclipse project files
.cproject
+18 -4
View File
@@ -1,4 +1,5 @@
SUBDIRS = man
ARFLAGS = cr
bin_PROGRAMS = shairport-sync
@@ -9,6 +10,8 @@ shairport_sync_SOURCES = shairport.c rtsp.c mdns.c mdns_external.c common.c rtp.
if BUILD_FOR_FREEBSD
AM_CXXFLAGS = -I/usr/local/include -Wno-multichar -Wall -Wextra -pthread -DSYSCONFDIR=\"$(sysconfdir)\" -O2
AM_CFLAGS = -Wno-multichar -Wall -Wextra -pthread -DSYSCONFDIR=\"$(sysconfdir)\" -O2
lib_dbus_interface_a_CFLAGS = -pthread -O2
lib_mpris_interface_a_CFLAGS = -pthread -O2
else
if BUILD_FOR_OPENBSD
AM_CXXFLAGS = -I/usr/local/include -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
@@ -16,6 +19,7 @@ if BUILD_FOR_OPENBSD
else
AM_CXXFLAGS = -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
AM_CFLAGS = -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
lib_dbus_interface_a_CFLAGS = -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -Wno-unused-parameter -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
endif
endif
@@ -96,9 +100,14 @@ endif
BUILT_SOURCES =
noinst_HEADERS =
CLEANFILES =
shairport_sync_LDADD =
noinst_LIBRARIES =
if USE_DBUS
shairport_sync_SOURCES += dbus-service.c dbus-interface.c
shairport_sync_LDADD += lib_dbus_interface.a
noinst_LIBRARIES += lib_dbus_interface.a
lib_dbus_interface_a_SOURCES = dbus-interface.c
shairport_sync_SOURCES += dbus-service.c
BUILT_SOURCES += dbus-interface.h dbus-interface.c
# We don't want to install this header
noinst_HEADERS += $(BUILT_SOURCES)
@@ -110,7 +119,10 @@ dbus-interface.h dbus-interface.c: org.gnome.ShairportSync.xml
endif
if USE_MPRIS
shairport_sync_SOURCES += mpris-service.c mpris-interface.c
shairport_sync_LDADD += lib_mpris_interface.a
noinst_LIBRARIES += lib_mpris_interface.a
lib_mpris_interface_a_SOURCES = mpris-interface.c
shairport_sync_SOURCES += mpris-service.c
BUILT_SOURCES += mpris-interface.h mpris-interface.c
# We don't want to install this header
noinst_HEADERS += $(BUILT_SOURCES)
@@ -126,13 +138,15 @@ noinst_PROGRAMS =
if USE_DBUS_CLIENT
#Make it, but don't install it anywhere
noinst_PROGRAMS += shairport-sync-dbus-test-client
shairport_sync_dbus_test_client_SOURCES = dbus-interface.c dbus-interface.h shairport-sync-dbus-test-client.c
shairport_sync_dbus_test_client_SOURCES = shairport-sync-dbus-test-client.c
shairport_sync_dbus_test_client_LDADD = lib_dbus_interface.a
endif
if USE_MPRIS_CLIENT
#Make it, but don't install it anywhere
noinst_PROGRAMS += shairport-sync-mpris-test-client
shairport_sync_mpris_test_client_SOURCES = mpris-interface.c mpris-interface.h shairport-sync-mpris-test-client.c
shairport_sync_mpris_test_client_SOURCES = shairport-sync-mpris-test-client.c
shairport_sync_mpris_test_client_LDADD = lib_mpris_interface.a
endif
install-exec-hook:
+1
View File
@@ -6,6 +6,7 @@ AC_INIT([shairport-sync], [3.3d19], [mikebrady@eircom.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
AC_PROG_RANLIB
# Derived from the Avahi configure.ac file
# Specifying the OS type, defaulting to linux.