-aweather_CPPFLAGS = $(AM_CPPFLAGS) -DDATADIR="\"$(datadir)\""
-aweather_LDADD = $(AM_LDADD) gis/libgis.la
+aweather_CPPFLAGS = \
+ -DHTMLDIR="\"$(DOTS)$(htmldir)\"" \
+ -DICONDIR="\"$(DOTS)$(datadir)/icons\"" \
+ -DPKGDATADIR="\"$(DOTS)$(pkgdatadir)\"" \
+ -DPLUGINSDIR="\"$(DOTS)$(pkglibdir)\""
+aweather_LDADD = $(GRITS_LIBS)
+
+wsr88ddec = wsr88ddec.c
+wsr88ddec_LDADD = $(GLIB_LIBS) -lbz2
+
+if SYS_WIN
+wsr88ddec_LDFLAGS = -mwindows
+
+aweather_SOURCES += resource.rc
+aweather_LDFLAGS = -mwindows
+aweather_CPPFLAGS += -I$(top_srcdir)/lib
+
+bin_PROGRAMS += aweather-dbg
+aweather_dbg_SOURCES = $(aweather_SOURCES)
+aweather_dbg_CPPFLAGS = $(aweather_CPPFLAGS)
+aweather_dbg_LDADD = $(aweather_LDADD)
+endif
+
+if SYS_MAC
+aweather_CPPFLAGS += $(MAC_CFLAGS)
+aweather_LDADD += $(MAC_LIBS)
+endif