mirror of
https://github.com/sharkcz/rkdeveloptool.git
synced 2024-11-22 14:06:47 +01:00
Merge pull request #5 from twoerner/contrib/twoerner/autotools-2
Contrib/twoerner/autotools 2
This commit is contained in:
commit
24ffa9195c
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
*.o
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
rkdeveloptool
|
||||
rkdeveloptool*bz2
|
24
Makefile
24
Makefile
@ -1,24 +0,0 @@
|
||||
# Simple Makefile for RK Flash Tool
|
||||
|
||||
CC = g++
|
||||
LD = $(CC)
|
||||
CXXFLAGS= -O2 -Wall -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0
|
||||
LDFLAGS = -L/usr/lib -Wl,-Bstatic -lusb-1.0 -Wl,-Bdynamic -ludev -lrt -lpthread
|
||||
|
||||
|
||||
PROGS = $(patsubst %.cpp,%.o, $(wildcard *.cpp))
|
||||
|
||||
rkdeveloptool: $(PROGS)
|
||||
$(CC) $(CXXFLAGS) $^ -o rkdeveloptool $(LDFLAGS)
|
||||
|
||||
install: $(PROGS)
|
||||
install -d -m 0755 /usr/local/bin
|
||||
install -m 0755 ./rkdeveloptool /usr/local/bin
|
||||
|
||||
clean:
|
||||
rm $(PROGS) ./rkdeveloptool
|
||||
|
||||
uninstall:
|
||||
cd /usr/local/bin && rm -f ./rkdeveloptool
|
||||
|
||||
|
20
Makefile.am
Normal file
20
Makefile.am
Normal file
@ -0,0 +1,20 @@
|
||||
## Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
|
||||
|
||||
SUBDIRS =
|
||||
DIST_SUBDIRS = cfg
|
||||
|
||||
AM_CPPFLAGS = -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE $(LIBUSB1_CFLAGS)
|
||||
|
||||
bin_PROGRAMS = rkdeveloptool
|
||||
rkdeveloptool_SOURCES = main.cpp \
|
||||
crc.cpp DefineHeader.h Endian.h DefineHeader.h Property.hpp \
|
||||
RKBoot.cpp RKBoot.h \
|
||||
RKComm.cpp RKComm.h \
|
||||
RKDevice.cpp RKDevice.h \
|
||||
RKImage.cpp RKImage.h \
|
||||
RKLog.cpp RKLog.h \
|
||||
RKScan.cpp RKScan.h
|
||||
rkdeveloptool_LDADD = $(LIBUSB1_LIBS)
|
||||
|
||||
clean-local::
|
||||
$(RM) -fr log
|
@ -4,7 +4,9 @@ compile and install
|
||||
1 install libusb and libudev
|
||||
sudo apt-get install libudev-dev libusb-1.0-0-dev
|
||||
2 go into root of rkdeveloptool
|
||||
3 make && make install
|
||||
3 autoreconf -i
|
||||
4 ./configure
|
||||
5 make
|
||||
|
||||
rkdeveloptool usage,input "rkdeveloptool -h" to see
|
||||
|
||||
|
6
cfg/.gitignore
vendored
Normal file
6
cfg/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
compile
|
||||
config*
|
||||
depcomp
|
||||
install*
|
||||
missing
|
||||
stamp*
|
6
cfg/Makefile.am
Normal file
6
cfg/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
## Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
|
||||
|
||||
########################
|
||||
# cfg/Makefile.am
|
||||
########################
|
||||
SUBDIRS =
|
24
configure.ac
Normal file
24
configure.ac
Normal file
@ -0,0 +1,24 @@
|
||||
dnl Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
|
||||
|
||||
AC_INIT([Rockchip rkdeveloptool], 1.0, [Eddie Cai <eddie.cai.linux@gmail.com>], rkdeveloptool)
|
||||
AC_PREREQ([2.68])
|
||||
AC_CONFIG_SRCDIR(main.cpp)
|
||||
AC_CONFIG_AUX_DIR(cfg)
|
||||
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9])
|
||||
AM_CONFIG_HEADER(cfg/config.h)
|
||||
|
||||
SUBDIRS=""
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([cfg/Makefile])
|
||||
|
||||
AC_OUTPUT
|
3
main.cpp
3
main.cpp
@ -13,6 +13,7 @@
|
||||
#include "RKComm.h"
|
||||
#include "RKDevice.h"
|
||||
#include "RKImage.h"
|
||||
#include "config.h"
|
||||
extern const char *szManufName[];
|
||||
CRKLog *g_pLogObject=NULL;
|
||||
CONFIG_ITEM_VECTOR g_ConfigItemVec;
|
||||
@ -758,7 +759,7 @@ bool handle_command(int argc, char* argv[], CRKScan *pScan)
|
||||
usage();
|
||||
return true;
|
||||
} else if(strcmp(strCmd.c_str(), "-V") == 0) {
|
||||
printf("rkDevelopTool ver 1.0\r\n");
|
||||
printf("rkDevelopTool ver %s\r\n", PACKAGE_VERSION);
|
||||
return true;
|
||||
}
|
||||
cnt = pScan->Search(RKUSB_MASKROM | RKUSB_LOADER);
|
||||
|
Loading…
Reference in New Issue
Block a user