]> Pileus Git - aweather/blobdiff - src/plugins/Makefile.am
Fix linker flags
[aweather] / src / plugins / Makefile.am
index 5dca79d9fe3b5e14a67be7ad3e4794f6353bb012..e67c7c652ab3fade7023d48cf48610b328a4290e 100644 (file)
@@ -1,7 +1,7 @@
-AM_CFLAGS   = -Wall --std=gnu99  -I../
-AM_CPPFLAGS = $(GIS_CFLAGS)
-AM_LDFLAGS  = -module -avoid-version -no-undefined
-LIBS        = $(GIS_LIBS)
+AM_CFLAGS   = -Wall --std=gnu99 $(GRITS_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
+AM_LDFLAGS  = -shared -module -avoid-version -Wl,-as-needed
+LIBS        = $(GRITS_LIBS)
 
 pluginsdir  = $(pkglibdir)
 
@@ -10,11 +10,20 @@ plugins_LTLIBRARIES =
 if HAVE_RSL
 plugins_LTLIBRARIES += radar.la
 radar_la_SOURCES = \
-       radar.c  radar.h \
-       level2.c level2.h \
-       ../aweather-colormap.c \
-       ../aweather-location.c
-radar_la_LDFLAGS = $(AM_LDFLAGS) $(RSL_LIBS)
+       radar.c      radar.h \
+       level2.c     level2.h \
+       radar-info.c radar-info.h \
+       ../aweather-location.c \
+       ../aweather-location.h
+radar_la_CPPFLAGS = \
+       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
+       -I$(top_srcdir)/src -I$(top_srcdir)/lib
+radar_la_LIBADD  = $(RSL_LIBS) $(GRITS_LIBS) \
+                  $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
+endif
+
+if WIN32
+dots = ..
 endif
 
 test: