From cd7e6f7475cc132a8b42e163ed5f437bc7e94779 Mon Sep 17 00:00:00 2001 From: Mirko Lindner Date: Tue, 30 Mar 2010 10:11:13 +0200 Subject: [PATCH] add stuff for openwrt compilation Signed-off-by: Mirko Lindner --- Makefile_openwrt | 151 ++++++++++++++++++++++++++++++++++++++++++++++ main.cpp | 2 +- moc_htmlarea.cpp | 7 --- moc_qmain.cpp | 7 --- qmain.cpp | 2 + qvido-pro-openwrt | 14 +++++ 6 files changed, 168 insertions(+), 15 deletions(-) create mode 100644 Makefile_openwrt create mode 100644 qvido-pro-openwrt diff --git a/Makefile_openwrt b/Makefile_openwrt new file mode 100644 index 0000000..28d6dcc --- /dev/null +++ b/Makefile_openwrt @@ -0,0 +1,151 @@ +############################################################################# +# Makefile for building: qvido +# Generated by qmake (2.01a) (Qt 4.6.2) on: Tue Mar 30 08:39:25 2010 +# Project: qvido.pro +# Template: app +# Command: /home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2/bin/qmake -spec mkspecs -unix -o Makefile qvido.pro +############################################################################# + +####### Compiler, tools and options + +CC = mipsel-openwrt-linux-uclibc-gcc +CXX = ../../../staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-g++ +DEFINES = +CFLAGS = -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include $(DEFINES) +CXXFLAGS = -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include $(DEFINES) +INCPATH = -Imkspecs -I. -I. -I../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include/Qt -I../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include/QtCore -I../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include/QtGui +LINK = ../../../staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/mipsel-openwrt-linux-uclibc-g++ +LFLAGS = -L/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qvido-20100329/lib -L/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib -L/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/lib -L/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib -Wl,-rpath-link=/home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib +LIBS = $(SUBLIBS) -L../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib -lzim -lcxxtools -lQtCore -lQtGui +AR = mipsel-openwrt-linux-uclibc-ar cqs +RANLIB = mipsel-openwrt-linux-uclibc-ranlib +QMAKE = /home/vegyraupe/work/qi/NanoNote/Ben/sw/openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +STRIP = : +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = main.cpp \ + htmlarea.cpp \ + qmain.cpp \ + moc_htmlarea.cpp \ + moc_qmain.cpp +OBJECTS = main.o \ + htmlarea.o \ + qmain.o \ + moc_htmlarea.o \ + moc_qmain.o +DIST = ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/g++.conf \ + ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/unix.conf \ + ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/linux.conf \ + ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/qws.conf \ + qvido.pro +QMAKE_TARGET = qvido +DESTDIR = +TARGET = qvido + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: qvido.pro mkspecs/qmake.conf ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/g++.conf \ + ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/unix.conf \ + ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/linux.conf \ + ../qt-everywhere-opensource-src-4.6.2/mkspecs/common/qws.conf + $(QMAKE) -spec mkspecs -unix -o Makefile qvido.pro +../qt-everywhere-opensource-src-4.6.2/mkspecs/common/g++.conf: +../qt-everywhere-opensource-src-4.6.2/mkspecs/common/unix.conf: +../qt-everywhere-opensource-src-4.6.2/mkspecs/common/linux.conf: +../qt-everywhere-opensource-src-4.6.2/mkspecs/common/qws.conf: +qmake: FORCE + @$(QMAKE) -spec mkspecs -unix -o Makefile qvido.pro + +dist: + @$(CHK_DIR_EXISTS) .tmp/qvido1.0.0 || $(MKDIR) .tmp/qvido1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qvido1.0.0/ && (cd `dirname .tmp/qvido1.0.0` && $(TAR) qvido1.0.0.tar qvido1.0.0 && $(COMPRESS) qvido1.0.0.tar) && $(MOVE) `dirname .tmp/qvido1.0.0`/qvido1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qvido1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +compiler_clean: + +####### Compile + +main.o: main.cpp qmain.h \ + htmlarea.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +htmlarea.o: htmlarea.cpp qmain.h \ + htmlarea.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o htmlarea.o htmlarea.cpp + +qmain.o: qmain.cpp qmain.h \ + htmlarea.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qmain.o qmain.cpp + +moc_htmlarea.o: moc_htmlarea.cpp htmlarea.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_htmlarea.o moc_htmlarea.cpp + +moc_qmain.o: moc_qmain.cpp qmain.h \ + htmlarea.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qmain.o moc_qmain.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/main.cpp b/main.cpp index f6d40b3..ddf36fa 100644 --- a/main.cpp +++ b/main.cpp @@ -8,7 +8,7 @@ int main(int argc, char *argv[]) { log_init(); log_debug("launching with arguments" << argv[1] ); - if (argc == 2) + if (argc > 2) { QApplication app(argc, argv); diff --git a/moc_htmlarea.cpp b/moc_htmlarea.cpp index 4a67cd1..efe45fa 100644 --- a/moc_htmlarea.cpp +++ b/moc_htmlarea.cpp @@ -8,13 +8,6 @@ *****************************************************************************/ #include "htmlarea.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'htmlarea.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.2. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_HtmlArea[] = { diff --git a/moc_qmain.cpp b/moc_qmain.cpp index 988b213..a6db185 100644 --- a/moc_qmain.cpp +++ b/moc_qmain.cpp @@ -8,13 +8,6 @@ *****************************************************************************/ #include "qmain.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'qmain.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.2. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_QMain[] = { diff --git a/qmain.cpp b/qmain.cpp index 2543b1a..084a3fc 100644 --- a/qmain.cpp +++ b/qmain.cpp @@ -40,6 +40,8 @@ QMain::QMain(std::string File) } +QMain::~QMain(){} + void QMain::searchDialog(){ bool ok; QString text = QInputDialog::getText(this, tr("Search Article"), diff --git a/qvido-pro-openwrt b/qvido-pro-openwrt new file mode 100644 index 0000000..4aeb761 --- /dev/null +++ b/qvido-pro-openwrt @@ -0,0 +1,14 @@ +###################################################################### +# Automatically generated by qmake (2.01a) Sat Mar 27 14:19:19 2010 +###################################################################### + +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . ../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include +LIBS = -L../../../staging_dir/target-mipsel_uClibc-0.9.30.1/usr/local/lib -lzim -lcxxtools +CONFIG += debug + +# Input +SOURCES += main.cpp htmlarea.cpp qmain.cpp moc_htmlarea.cpp moc_qmain.cpp +HEADERS += htmlarea.h qmain.h \ No newline at end of file