bin_PROGRAMS = openocd
-openocd_SOURCES = openocd.c
+
+if ECOSBOARD
+MAINFILE = ecosboard.c
+else
+MAINFILE = openocd.c
+endif
+
+
+openocd_SOURCES = $(MAINFILE)
# set the include path found by configure
INCLUDES = -I$(top_srcdir)/src/helper \
endif
if FT2232_LIBFTDI
-FTDI2232LIB = -lftdi
+FTDI2232LIB = -lftdi -lusb
else
if PRESTO_LIBFTDI
-FTDI2232LIB = -lftdi
+FTDI2232LIB = -lftdi -lusb
else
FTDI2232LIB =
endif