]> Pileus Git - aweather/blobdiff - src/plugins/Makefile.am
Fix threading bug in Alert plugin
[aweather] / src / plugins / Makefile.am
index 9755b8c66cb180e9d0df7661d3c5208c81755814..912bb46160111adc5a4ef675c0fa291de5f8bb3c 100644 (file)
@@ -1,11 +1,18 @@
 AM_CFLAGS   = -Wall --std=gnu99 $(GRITS_CFLAGS)
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
-AM_LDFLAGS  = -module -avoid-version -no-undefined
+AM_LDFLAGS  = -shared -module -avoid-version -Wl,--as-needed
 LIBS        = $(GRITS_LIBS)
 
 pluginsdir  = $(pkglibdir)
 
-plugins_LTLIBRARIES =
+plugins_LTLIBRARIES = alert.la
+
+alert_la_SOURCES = \
+       alert.c      alert.h \
+       alert-info.c alert-info.h
+alert_la_CPPFLAGS = \
+       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\""
+alert_la_LIBADD  = $(GRITS_LIBS)
 
 if HAVE_RSL
 plugins_LTLIBRARIES += radar.la
@@ -16,9 +23,14 @@ radar_la_SOURCES = \
        ../aweather-location.c \
        ../aweather-location.h
 radar_la_CPPFLAGS = \
-       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\""
-radar_la_LIBADD  = $(RSL_LIBS) $(GRITS_LIBS) \
-                  $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
+       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
+       -I$(top_srcdir)/src
+radar_la_LIBADD  = $(RSL_LIBS) $(GRITS_LIBS)
+endif
+
+if WIN32
+AM_LDFLAGS += -no-undefined
+dots = ..
 endif
 
 test: