-aweather_SOURCES = \
- aweather.c aweather.h \
- opengl.c opengl.h \
- plugin-radar.c plugin-radar.h \
- plugin-ridge.c plugin-ridge.h \
- plugin-example.c plugin-example.h
-aweather_LDADD = $(RSL_LIBS) $(GTK_LIBS) $(CURL_LIBS)
+if !SYS_MAC
+AM_LDFLAGS += -Wl,--as-needed
+endif
+
+bin_PROGRAMS = aweather wsr88ddec
+aweather_SOURCES = main.c \
+ aweather-gui.c aweather-gui.h \
+ aweather-location.c aweather-location.h
+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
+
+.rc.o: ../data/icons/48x48/aweather.ico
+ $(RC) -o $@ $<
+
+CLEANFILES = gmon.out valgrind.out
+MAINTAINERCLEANFILES = Makefile.in