Remove st-term from the list of the targets for MinGW.
st-term uses termios and would require a rewrite to have
it compile on MinGW. Also remove cleanup signal handlers
in gdb-server for MinGW to compile.
AUTOMAKE_OPTIONS = subdir-objects
+if MINGW
+bin_PROGRAMS = st-flash st-util st-info
+else
bin_PROGRAMS = st-flash st-util st-term st-info
+endif
noinst_LIBRARIES = libstlink.a
src/stlink-usb.c \
src/stlink-sg.c \
src/uglylogging.c \
- src/st-term.c \
src/st-info.c
+if !MINGW
+CFILES += src/st-term.c
+endif
+
HFILES = \
src/stlink-common.h \
src/stlink-usb.h \
*-mingw32*)
LIBS="$LIBS -lws2_32"
CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $CPPFLAGS"
+ AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
+ AM_CONDITIONAL(MINGW, true)
;;
+ *)
+ AM_CONDITIONAL(MINGW, false)
esac
MAYBE_GUI=
int serve(stlink_t *sl, st_state_t *st);
char* make_memory_map(stlink_t *sl);
+#ifndef __MINGW32__
static void cleanup(int signal __attribute__((unused))) {
if (connected_stlink) {
/* Switch back to mass storage mode before closing. */
exit(1);
}
+#endif
}
connected_stlink = sl;
+#ifndef __MINGW32__
signal(SIGINT, &cleanup);
signal(SIGTERM, &cleanup);
+#endif
if (state.reset) {
stlink_reset(sl);