Use ELEMENTARY_BUILD in CPP flags as it will be used only on Windows anyway.
-I$(top_builddir)/src/lib \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_WAYLAND_CFLAGS@ \
@ELEMENTARY_DRM_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
pkgdir = $(libdir)/edje/modules/elm/$(MODULE_EDJE)
pkg_LTLIBRARIES = module.la
-DLOCALE_DIR=\"$(localedir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DICON_DIR=\"$(datadir)/icons\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_WAYLAND_CFLAGS@ \
@ELEMENTARY_DRM_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
lib_LTLIBRARIES = libelementary.la
includes_HEADERS = \
-I$(top_builddir)/src/lib \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_EMAP_CFLAGS@ \
@ELEMENTARY_WAYLAND_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
pkgdir = $(libdir)/elementary/modules/access_output/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
-I$(top_builddir)/src/lib \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_EMAP_CFLAGS@ \
@ELEMENTARY_DRM_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
pkgdir = $(libdir)/elementary/modules/datetime_input_ctxpopup/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DLOCALE_DIR=\"$(localedir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_EMAP_CFLAGS@ \
@ELEMENTARY_WAYLAND_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
pkgdir = $(libdir)/elementary/modules/prefs/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
-I$(top_builddir)/src/lib \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_EMAP_CFLAGS@ \
@ELEMENTARY_WAYLAND_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
pkgdir = $(libdir)/elementary/modules/test_entry/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
-I$(top_builddir)/src/lib \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
@ELEMENTARY_CFLAGS@ \
@ELEMENTARY_X_CFLAGS@ \
@ELEMENTARY_FB_CFLAGS@ \
@ELEMENTARY_EMAP_CFLAGS@ \
@ELEMENTARY_WAYLAND_CFLAGS@
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
pkgdir = $(libdir)/elementary/modules/test_map/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la