NSM: Fix up configure and makefile. Also, clear some compiler warnings.

This commit is contained in:
Jonathan Moore Liles 2012-06-16 19:46:29 -07:00
parent 94367a990c
commit 13b6537ee4
5 changed files with 11 additions and 15 deletions

View File

@ -20,7 +20,6 @@ require_FLTK 1.3.0 images
require_command FLUID lib/ntk/fluid/fluid
suggest_package JACK 0.103.0 jack
require_package liblo 0.23 liblo
require_package sigcpp 2.0.0 sigc++-2.0
suggest_package XPM 2.0.0 xpm
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"

View File

@ -13,8 +13,8 @@ SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
LIBS += $(LIBLO_LIBS) $(SIGCPP_LIBS)
CFLAGS += $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS)
LIBS += $(LIBLO_LIBS)
CFLAGS += $(LIBLO_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) -D_GNU_SOURCE
src/nsmd: src/nsmd.o nonlib/libnonlib.a
@ echo -n Linking session handler.
@ -26,14 +26,14 @@ src/session-manager: src/session-manager.o nonlib/libnonlib.a $(FLTK_LIBS)
src/nsm-proxy: src/nsm-proxy.o nonlib/libnonlib.a
@ echo -n Linking NSM Proxy.
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE)
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBLO_LIBS) -Lnonlib -lnonlib && echo $(DONE)
# src/NSM_Proxy_UI.o:
# @ cd src && $(FLUID) -c NSM_Proxy_UI.fl
src/nsm-proxy-gui: src/NSM_Proxy_UI.o src/nsm-proxy-gui.o nonlib/libnonlib.a $(FLTK_LIBS)
@ echo -n Linking NSM Proxy.
@ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $^ -o $@ $(XPM_LIBS) $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
src/nsm-proxy-gui: src/NSM_Proxy_UI.o src/nsm-proxy-gui.o $(FLTK_LIBS)
@ echo -n Linking NSM Proxy...
@ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $^ -o $@ $(XPM_LIBS) $(LIBLO_LIBS) $(FLTK_LIBS) -LFL -lfl_widgets && echo $(DONE)
src/send_osc: src/send_osc.o nonlib/libnonlib.a
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE)

View File

@ -23,7 +23,6 @@
*/
#define _GNU_SOURCE
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <string.h>

View File

@ -17,7 +17,6 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/
#define _GNU_SOURCE
#pragma GCC diagnostic ignored "-Wunused-parameter"

View File

@ -17,7 +17,6 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/
#define _GNU_SOURCE
#pragma GCC diagnostic ignored "-Wunused-parameter"
#define _MODULE_ "nsm-proxy"
@ -115,12 +114,12 @@ public:
else
asprintf( &cmd, "exec %s", _executable );
char *args[] = { _executable, "-c", cmd, NULL };
const char *args[] = { _executable, "-c", cmd, NULL };
setenv( "NSM_CLIENT_ID", nsm_client_id, 1 );
setenv( "NSM_SESSION_NAME", nsm_display_name, 1 );
if ( -1 == execvp( "/bin/sh", args ) )
if ( -1 == execvp( "/bin/sh", (char**)args ) )
{
WARNING( "Error starting process: %s", strerror( errno ) );
@ -358,9 +357,9 @@ show_gui ( void )
char *url = lo_server_get_url( losrv );
char *args[] = { executable, "--connect-to", url, NULL };
const char *args[] = { executable, "--connect-to", url, NULL };
if ( -1 == execvp( executable, args ) )
if ( -1 == execvp( executable, (char**)args ) )
{
WARNING( "Error starting process: %s", strerror( errno ) );
@ -493,7 +492,7 @@ osc_start ( const char *path, const char *types, lo_arg **argv, int argc, lo_mes
{
snapshot( project_file );
if ( nsm_proxy->start( &argv[0]->s, &argv[1]->s ) );
if ( nsm_proxy->start( &argv[0]->s, &argv[1]->s ) )
{
hide_gui();
}