]> Pileus Git - aweather/blobdiff - src/plugins/Makefile.am
Add -no-undefined for win32 build
[aweather] / src / plugins / Makefile.am
index 9755b8c66cb180e9d0df7661d3c5208c81755814..502bb260fa7471b5a389bf8a04f28a9c32f85d4b 100644 (file)
@@ -1,6 +1,6 @@
 AM_CFLAGS   = -Wall --std=gnu99 $(GRITS_CFLAGS)
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
 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)
 LIBS        = $(GRITS_LIBS)
 
 pluginsdir  = $(pkglibdir)
@@ -16,11 +16,17 @@ radar_la_SOURCES = \
        ../aweather-location.c \
        ../aweather-location.h
 radar_la_CPPFLAGS = \
        ../aweather-location.c \
        ../aweather-location.h
 radar_la_CPPFLAGS = \
-       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\""
+       -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
 
 radar_la_LIBADD  = $(RSL_LIBS) $(GRITS_LIBS) \
                   $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
 endif
 
+if WIN32
+AM_LDFLAGS += -no-undefined
+dots = ..
+endif
+
 test:
        ( cd ../; make test )
 
 test:
        ( cd ../; make test )