]> Pileus Git - grits/blobdiff - src/plugins/Makefile.am
Move OpenGL includes to a common place
[grits] / src / plugins / Makefile.am
index 0052a5932b04ebbb74ec9a94705ff8154b7617bf..d713c3580ec5a38b8548b980a36c478a0426125d 100644 (file)
@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in
 
 AM_CFLAGS   = -Wall --std=gnu99 -I$(top_srcdir)/src
 AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
-AM_LDFLAGS  = -shared -module -avoid-version -no-undefined
+AM_LDFLAGS  = -shared -module -avoid-version -Wl,--as-needed
 LIBS        = $(top_srcdir)/src/libgrits.la
 
 pluginsdir  = "$(libdir)/$(GRITS_SUBDIR)"
@@ -14,10 +14,17 @@ map_la_SOURCES      = map.c  map.h
 env_la_SOURCES      = env.c  env.h
 test_la_SOURCES     = test.c test.h
 
+if WIN32
+AM_LDFLAGS += -no-undefined
+endif
+
+if HAVE_GLUT
 noinst_LTLIBRARIES  = teapot.la
 teapot_la_SOURCES   = \
        $(top_srcdir)/examples/plugin/teapot.c \
        $(top_srcdir)/examples/plugin/teapot.h
+teapot_la_LDFLAGS   = $(AM_LDFLAGS) -lglut -rpath $(libdir) # I hate you libtool
+endif
 
 test:
        ( cd ../; make test )