Commit 3cc787bf authored by springob's avatar springob
Browse files

* linux build with autoconfig


git-svn-id: https://svn.code.sf.net/p/robodude/code/bobdude@49 bbe26285-3967-4f0a-9db1-5cc42c1bf15a
parent 4fe6d3da
......@@ -103,6 +103,33 @@
<Add option="-lboost_system" />
</Linker>
</Target>
<Target title="Linux">
<Option output="BobDude" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0" />
<Add option="-I/usr/include/wx-3.0" />
<Add option="-D_FILE_OFFSET_BITS=64" />
<Add option="-DWXUSINGDLL" />
<Add option="-D__WXGTK__" />
<Add option="-D__LINUX__" />
<Add directory="." />
</Compiler>
<Linker>
<Add option="-L/usr/lib/x86_64-linux-gnu" />
<Add option="-pthread" />
<Add option="-lwx_gtk2u_xrc-3.0" />
<Add option="-lwx_gtk2u_html-3.0" />
<Add option="-lwx_gtk2u_qa-3.0" />
<Add option="-lwx_gtk2u_adv-3.0" />
<Add option="-lwx_gtk2u_core-3.0" />
<Add option="-lwx_baseu_xml-3.0" />
<Add option="-lwx_baseu_net-3.0" />
<Add option="-lwx_baseu-3.0" />
<Add option="-lavrdude" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
......@@ -124,6 +151,7 @@
<Unit filename="resource.rc">
<Option compilerVar="WINDRES" />
<Option target="MSW" />
<Option target="Linux" />
</Unit>
<Unit filename="stdplatform.cpp" />
<Unit filename="stdplatform.h" />
......
......@@ -88,8 +88,12 @@ bool BobDudeApp::OnCmdLineParsed(wxCmdLineParser& parser) {
wxString configFile;
// and other command line parameters
if (parser.Found( wxT("c"), &configFile)) {
} else {
configFile = ::wxStandardPaths::Get().GetDataDir() + ::wxFileName::GetPathSeparator() + "avrdude.conf";
} else {
#if defined(AVRDUDE_CONF)
configFile = AVRDUDE_CONF;
#else
configFile = ::wxStandardPaths::Get().GetDataDir() + ::wxFileName::GetPathSeparator() + "avrdude.conf";
#endif
}
// then do what you need with them.
conf = configFile;
......
/usr/share/automake-1.15/COPYING
\ No newline at end of file
/usr/share/automake-1.15/INSTALL
\ No newline at end of file
bin_PROGRAMS = bobdude
bobdude_SOURCES = avrdude.cpp BobDudeApp.cpp HTMLButton.cpp MainFrame.cpp part.cpp PlatformDialog.cpp programmer.cpp stdplatform.cpp update.cpp xhex.cpp xml/nodes.cpp xml/stream.cpp
......@@ -308,7 +308,9 @@ wxArrayString listDevices(const wxString & pattern) {
wxArrayString PlatformDialog::getUSBComPorts(const wxString & vid, const wxString & pid) {
#if defined(__WINDOWS__)
return loc_StringArrayAnd(getExistingUSBComPorts(vid, pid), getAvailableComPorts());
return loc_StringArrayAnd(getExistingUSBComPorts(vid, pid), getAvailableComPorts());
#elif defined(__LINUX__)
return listDevices("ttyACM*");
#else
return listDevices("tty.usb*");
#endif
......
This diff is collapsed.
AC_PREREQ(2.60)
AC_INIT(bobdude, 1.2, dude@bob3.org)
AC_CONFIG_FILES([Makefile])
AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CXX
AC_CHECK_HEADER_STDBOOL
AC_PREREQ
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
dnl AC_SEARCH_LIBS([avr_read_byte_default], [avrdude])
LIBS_BEFORE="$LIBS"
LIBS="$LIBS -lavrdude"
AVRDUDE_LIB="-lavrdude"
AC_MSG_CHECKING(for libavrdude)
AC_TRY_LINK([
char avr_read_byte_default();
void progbuf(){}
void progname(){}
void ceil(){}
void ovsigck(){}
void quell_progress(){}
void avrdude_message(){}
void log(){}
void pow(){}
void verbose(){}
], [avr_read_byte_default();], [AC_MSG_RESULT([ok])], [AC_MSG_ERROR([failed (check your CFLAGS)])])
LIBS="$LIBS_BEFORE"
dnl AC_MSG_CHECKING(for avrdude.conf)
dnl AC_CHECK_FILE ([avrdude.conf], [AC_MSG_RESULT([ok])], [AC_MSG_ERROR([failed (check your avrdude.conf)])])
dnl AC_CHECK_FILE (avrdude.conf)
AC_CHECK_FILE([/etc/avrdude.conf], [AVRDUDE_CONF="/etc/avrdude.conf"])
AC_CHECK_FILE([/usr/local/etc/avrdude.conf], [AVRDUDE_CONF="/usr/local/etc/avrdude.conf"])
AM_OPTIONS_WXCONFIG
reqwx=2.4.0
AM_PATH_WXCONFIG($reqwx, wxWin=1)
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWidgets version is $reqwx or above.
])
fi
AC_SEARCH_LIBS([avr_read_byte_default], [avrdude])
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS -DAVRDUDE_CONF=\\\"$AVRDUDE_CONF\\\""
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY -DAVRDUDE_CONF=\\\"$AVRDUDE_CONF\\\""
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY -DAVRDUDE_CONF=\\\"$AVRDUDE_CONF\\\""
LIBS="$LIBS $WX_LIBS $AVRDUDE_LIB"
AC_OUTPUT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment