]> Pileus Git - grits/blobdiff - src/plugins/Makefile.am
Update compass plugin
[grits] / src / plugins / Makefile.am
index 8e6f5f6eb0ef0a26f6fbe9ae80af79489b1ea670..7c087a13ddf15dc1953db3a56185e2febcfee2d4 100644 (file)
@@ -1,10 +1,17 @@
 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 -Wl,--as-needed
+AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(GL_CFLAGS) $(SOUP_CFLAGS)
+AM_LDFLAGS  = -shared -module -avoid-version
 LIBS        = $(top_srcdir)/src/libgrits.la
 
+if SYS_WIN
+AM_LDFLAGS += -no-undefined
+endif
+if !SYS_MAC
+AM_LDFLAGS += -Wl,--as-needed
+endif
+
 pluginsdir  = "$(libdir)/$(GRITS_SUBDIR)"
 
 plugins_LTLIBRARIES = sat.la elev.la map.la env.la test.la
@@ -19,6 +26,9 @@ 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
+env_la_CPPFLAGS     = $(AM_CPPFLAGS) -DHAVE_GLUT
+env_la_LDFLAGS      = $(AM_LDFLAGS) -lglut
 endif
 
 test: