mirror of
https://github.com/sharkcz/rkdeveloptool.git
synced 2025-02-13 22:36:47 +01:00
commit
5b7445d109
@ -18,4 +18,4 @@ rkdeveloptool_SOURCES = main.cpp \
|
|||||||
rkdeveloptool_LDADD = $(LIBUSB1_LIBS)
|
rkdeveloptool_LDADD = $(LIBUSB1_LIBS)
|
||||||
|
|
||||||
clean-local::
|
clean-local::
|
||||||
$(RM) -fr log
|
rm -fr log
|
||||||
|
12
configure.ac
12
configure.ac
@ -16,6 +16,18 @@ AC_PROG_MAKE_SET
|
|||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
|
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
case "$host_os" in
|
||||||
|
openbsd*)
|
||||||
|
CPPFLAGS="$CFLAGS -I/usr/local/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SEARCH_LIBS(iconv, iconv)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)
|
PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
4
main.cpp
4
main.cpp
@ -832,7 +832,7 @@ int MakeIDBlockData(PBYTE pDDR, PBYTE pLoader, PBYTE lpIDBlock, USHORT usFlashDa
|
|||||||
|
|
||||||
bool check_device_type(STRUCT_RKDEVICE_DESC &dev, UINT uiSupportType)
|
bool check_device_type(STRUCT_RKDEVICE_DESC &dev, UINT uiSupportType)
|
||||||
{
|
{
|
||||||
if ((dev.emUsbType & uiSupportType) == dev.emUsbType)
|
if (((UINT)dev.emUsbType & uiSupportType) == (UINT)dev.emUsbType)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1157,7 +1157,7 @@ static bool parseOpts(void) {
|
|||||||
file = fopen(configPath, "r");
|
file = fopen(configPath, "r");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
fprintf(stderr, "config (%s) not found!\n", configPath);
|
fprintf(stderr, "config (%s) not found!\n", configPath);
|
||||||
if (configPath == (char*)DEF_CONFIG_FILE) {
|
if (strcmp(configPath, (char*)DEF_CONFIG_FILE) == 0) {
|
||||||
file = fopen(DEF_CONFIG_FILE, "w");
|
file = fopen(DEF_CONFIG_FILE, "w");
|
||||||
if (file) {
|
if (file) {
|
||||||
fprintf(stderr, "creating defconfig\n");
|
fprintf(stderr, "creating defconfig\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user