x_objs=console-x.o device-x.o event-Xt.o frame-x.o\
glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
x_objs=console-x.o device-x.o event-Xt.o frame-x.o\
glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
## -Demacs is needed to make some files produce the correct version
## for use in Emacs.
cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
cflags = $(CFLAGS) $(cppflags)
## -Demacs is needed to make some files produce the correct version
## for use in Emacs.
cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
cflags = $(CFLAGS) $(cppflags)
-#if defined (WIN32_NATIVE) || defined (CYGWIN)
-ldflags = $(LDFLAGS) -mwindows $(ld_switch_all) $(ld_dynamic_link_flags)
+#if defined (WIN32_NATIVE)
+ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags)
gui.o gutter.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
macros.o marker.o md5.o minibuf.o objects.o opaque.o\
gui.o gutter.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
macros.o marker.o md5.o minibuf.o objects.o opaque.o\
rangetab.o redisplay.o redisplay-output.o regex.o\
search.o select.o $(sheap_objs) signal.o sound.o\
specifier.o strftime.o symbols.o syntax.o sysdep.o\
rangetab.o redisplay.o redisplay-output.o regex.o\
search.o select.o $(sheap_objs) signal.o sound.o\
specifier.o strftime.o symbols.o syntax.o sysdep.o\