diff --git a/utils/GPSsmooth/Makefile.am b/utils/GPSsmooth/Makefile.am index db6c26365..c0d4edebd 100644 --- a/utils/GPSsmooth/Makefile.am +++ b/utils/GPSsmooth/Makefile.am @@ -1,11 +1,22 @@ noinst_PROGRAMS = GPSsmooth MIDGsmooth UGsmooth +if HAVE_FRAMEWORK_PLIB +GPSsmooth_LDFLAGS = $(plib_FRAMEWORK) +MIDGsmooth_LDFLAGS = $(plib_FRAMEWORK) +UGsmooth_LDFLAGS = $(plib_FRAMEWORK) +else +GPSsmooth_PLIB_LIBS = -lplibnet -lplibul +MIDGsmooth_PLIB_LIBS = -lplibnet -lplibul +UGsmooth_PLIB_LIBS = -lplibnet -lplibul +endif + + GPSsmooth_SOURCES = \ gps.cxx gps.hxx \ gps_main.cxx GPSsmooth_LDADD = \ - -lsgtiming -lsgmisc -lsgdebug -lplibnet -lplibul \ + $(GPSsmooth_PLIB_LIBS) -lsgtiming -lsgmisc -lsgdebug \ $(joystick_LIBS) $(network_LIBS) $(base_LIBS) -lz MIDGsmooth_SOURCES = \ @@ -13,9 +24,8 @@ MIDGsmooth_SOURCES = \ MIDG_main.cxx MIDGsmooth_LDADD = \ - -lsgio -lsgserial -lsgtiming -lsgmath -lsgbucket -lsgmisc -lsgdebug \ - -lsgstructure \ - -lplibnet -lplibul \ + $(MIDGsmooth_PLIB_LIBS) -lsgio -lsgserial -lsgtiming \ + -lsgmath -lsgbucket -lsgmisc -lsgdebug -lsgstructure \ $(joystick_LIBS) $(network_LIBS) $(base_LIBS) -lz UGsmooth_SOURCES = \ @@ -26,9 +36,8 @@ UGsmooth_SOURCES = \ UGear_telnet.cxx UGear_telnet.hxx UGsmooth_LDADD = \ - -lsgio -lsgserial -lsgtiming -lsgmath -lsgbucket -lsgmisc -lsgdebug \ - -lplibnet -lplibul \ + $(UGsmooth_PLIB_LIBS) -lsgio -lsgserial -lsgtiming \ + -lsgmath -lsgbucket -lsgmisc -lsgdebug \ $(joystick_LIBS) $(network_LIBS) $(base_LIBS) -lz - INCLUDES = -I$(top_srcdir)/src diff --git a/utils/Makefile.am b/utils/Makefile.am index 1f183fec5..eef564a8f 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,4 +1,4 @@ -DIST_SUBDIRS = GPSsmooth TerraSync Modeller js_server fgadmin xmlgrep propmerge +DIST_SUBDIRS = GPSsmooth TerraSync Modeller js_server fgadmin xmlgrep propmerge fgpanel -SUBDIRS = GPSsmooth TerraSync Modeller js_server propmerge fgviewer +SUBDIRS = GPSsmooth TerraSync Modeller js_server propmerge fgviewer fgpanel diff --git a/utils/TerraSync/Makefile.am b/utils/TerraSync/Makefile.am index aebd95960..0b71b9ea4 100644 --- a/utils/TerraSync/Makefile.am +++ b/utils/TerraSync/Makefile.am @@ -6,4 +6,10 @@ terrasync_SOURCES = terrasync.cxx AM_CPPFLAGS = $(svn_CPPFLAGS) -terrasync_LDADD = -lplibnet -lplibul -lsgmisc -lsgdebug $(network_LIBS) $(svn_LIBS) +if HAVE_FRAMEWORK_PLIB +terrasync_LDFLAGS = $(plib_FRAMEWORK) +else +terrasync_PLIB_LIBS = -lplibnet -lplibul +endif + +terrasync_LDADD = $(terrasync_PLIB_LIBS) -lsgmisc -lsgdebug $(network_LIBS) $(svn_LIBS) diff --git a/utils/fgviewer/Makefile.am b/utils/fgviewer/Makefile.am index 1321349cf..4f46419a2 100644 --- a/utils/fgviewer/Makefile.am +++ b/utils/fgviewer/Makefile.am @@ -3,8 +3,21 @@ AM_CXXFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" bin_PROGRAMS = fgviewer +if HAVE_FRAMEWORK_PLIB +fgviewer_LDFLAGS = $(plib_FRAMEWORK) +else +fgviewer_PLIB_LIBS = -lplibul +fgviewer_LDFLAGS = +endif + +if HAVE_FRAMEWORK_OSG +fgviewer_LDFLAGS += $(osg_FRAMEWORKS) $(openthreads_FRAMEWORK) +else +fgviewer_LDFLAGS += $(osg_LIBS) $(openthreads_LIBS) +endif + fgviewer_SOURCES = fgviewer.cxx fgviewer_LDADD = \ -lsgtgdb -lsgmaterial -lsgmodel -lsgbvh -lsgutil -lsgio -lsgbucket \ -lsgmath -lsgprops -lsgdebug -lsgmisc -lsgxml -lsgstructure \ - -lplibul $(OSG_LIBS) $(opengl_LIBS) $(THREAD_LIBS) -lz + $(fgviewer_PLIB_LIBS) $(OSG_LIBS) $(opengl_LIBS) $(THREAD_LIBS) -lz diff --git a/utils/js_server/Makefile.am b/utils/js_server/Makefile.am index d4ca0a49e..a21dc380e 100644 --- a/utils/js_server/Makefile.am +++ b/utils/js_server/Makefile.am @@ -1,4 +1,10 @@ noinst_PROGRAMS = js_server +if HAVE_FRAMEWORK_PLIB +js_server_LDFLAGS = $(plib_FRAMEWORK) +else +js_server_PLIB_LIBS = -lplibjs -lplibnet -lplibul +endif + js_server_SOURCES = js_server.cxx -js_server_LDADD = -lplibjs -lplibnet -lplibul $(base_LIBS) $(joystick_LIBS) $(network_LIBS) +js_server_LDADD = $(js_server_PLIB_LIBS) $(base_LIBS) $(joystick_LIBS) $(network_LIBS)