mirror of https://github.com/EspoTek/Labrador.git
Librador no longer links against Qt5. Octave is happy about that.
This commit is contained in:
parent
264838c6e3
commit
cf331ed16a
|
@ -50,3 +50,9 @@ Matlab_Octave_API/___librador/demo/librademo/librademo
|
||||||
*.mex
|
*.mex
|
||||||
|
|
||||||
Librador_API/___librador/MATLAB_Octave/octave-workspace
|
Librador_API/___librador/MATLAB_Octave/octave-workspace
|
||||||
|
|
||||||
|
Librador_API/___librador/librador_shared_library/Makefile
|
||||||
|
|
||||||
|
Librador_API/___librador/demo_qt/librademo/librademo
|
||||||
|
|
||||||
|
Librador_API/___librador/librador_shared_library/a\.out
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
function [] = librador_compile(fname_no_dot_cpp, idename)
|
function [] = librador_compile(fname_no_dot_cpp, idename)
|
||||||
fprintf("\n\n\nCompiling %s.cpp...\n\n\n", fname_no_dot_cpp);
|
fprintf("\n\n\nCompiling %s.cpp...\n\n\n", fname_no_dot_cpp);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
mex(['-DCOMPILE_FOR_' idename], '-I../../../Desktop_Interface/build_linux/libusb', '-I../librador_shared_library', '-lrador', '-L../librador_shared_library', ['C/mexsrc/' fname_no_dot_cpp '.cpp'])
|
mex(['-DCOMPILE_FOR_' idename], '-I../../../Desktop_Interface/build_linux/libusb', '-I../librador_shared_library', '-lrador', '-L../librador_shared_library', '-Wl,-rpath=../librador_shared_library', ['C/mexsrc/' fname_no_dot_cpp '.cpp'])
|
||||||
copyfile([fname_no_dot_cpp '.mex'], 'C/mex_outputs')
|
copyfile([fname_no_dot_cpp '.mex'], 'C/mex_outputs')
|
||||||
delete([fname_no_dot_cpp '.mex'])
|
delete([fname_no_dot_cpp '.mex'])
|
||||||
copyfile([fname_no_dot_cpp '.o'], 'C/mex_outputs')
|
copyfile([fname_no_dot_cpp '.o'], 'C/mex_outputs')
|
||||||
|
|
Binary file not shown.
|
@ -35,7 +35,7 @@ MOVE = mv -f
|
||||||
TAR = tar -cf
|
TAR = tar -cf
|
||||||
COMPRESS = gzip -9f
|
COMPRESS = gzip -9f
|
||||||
DISTNAME = rador1.0.0
|
DISTNAME = rador1.0.0
|
||||||
DISTDIR = /home/esposch/Git/Labrador/Matlab_Octave_API/___librador/librador/.tmp/rador1.0.0
|
DISTDIR = /home/esposch/Git/Labrador/Librador_API/___librador/librador_shared_library/.tmp/rador1.0.0
|
||||||
LINK = g++
|
LINK = g++
|
||||||
LFLAGS = -Wl,-O1 -Wl,-rpath,/home/esposch/Qt/5.10.0/gcc_64/lib -shared -Wl,-soname,librador.so.1
|
LFLAGS = -Wl,-O1 -Wl,-rpath,/home/esposch/Qt/5.10.0/gcc_64/lib -shared -Wl,-soname,librador.so.1
|
||||||
LIBS = $(SUBLIBS) -L../../../Desktop_Interface/build_linux/libusb -lusb-1.0 -L../../../Desktop_Interface/build_linux/libdfuprog/lib/x64 -ldfuprog-0.9 -L/home/esposch/Qt/5.10.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
|
LIBS = $(SUBLIBS) -L../../../Desktop_Interface/build_linux/libusb -lusb-1.0 -L../../../Desktop_Interface/build_linux/libdfuprog/lib/x64 -ldfuprog-0.9 -L/home/esposch/Qt/5.10.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
|
||||||
|
@ -738,37 +738,7 @@ librador.o: librador.cpp librador.h \
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qversiontagging.h \
|
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qversiontagging.h \
|
||||||
librador_internal.h \
|
librador_internal.h \
|
||||||
usbcallhandler.h \
|
usbcallhandler.h \
|
||||||
../../../Desktop_Interface/build_linux/libusb/libusb.h \
|
../../../Desktop_Interface/build_linux/libusb/libusb.h
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/QThread \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qthread.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qobject.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qobjectdefs.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qnamespace.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qobjectdefs_impl.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstring.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qchar.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qbytearray.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qrefcount.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qarraydata.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstringliteral.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstringalgorithms.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstringview.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstringbuilder.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qlist.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qalgorithms.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qiterator.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qhashfunctions.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qpair.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qbytearraylist.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstringlist.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qregexp.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qstringmatcher.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qcoreevent.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qscopedpointer.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qmetatype.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qvarlengtharray.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qcontainerfwd.h \
|
|
||||||
/home/esposch/Qt/5.10.0/gcc_64/include/QtCore/qobject_impl.h
|
|
||||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o librador.o librador.cpp
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o librador.o librador.cpp
|
||||||
|
|
||||||
o1buffer.o: o1buffer.cpp o1buffer.h
|
o1buffer.o: o1buffer.cpp o1buffer.h
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
!#/bin/sh
|
||||||
|
|
||||||
|
#Clean Up
|
||||||
|
rm -f librador.o o1buffer.o usbcallhandler.o
|
||||||
|
|
||||||
|
#Build Librador main object
|
||||||
|
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DLIBRADOR_LIBRARY -DPLATFORM_LINUX -I. -I../../../Desktop_Interface -I../../../Desktop_Interface/build_linux/libusb -I../../../Desktop_Interface/build_linux/libdfuprog/include -I. -isystem /usr/include/libdrm -o librador.o librador.cpp
|
||||||
|
|
||||||
|
#Build O1buffer
|
||||||
|
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DLIBRADOR_LIBRARY -DPLATFORM_LINUX -DQT_NO_DEBUG -I. -I../../../Desktop_Interface -I../../../Desktop_Interface/build_linux/libusb -I../../../Desktop_Interface/build_linux/libdfuprog/include -I. -isystem /usr/include/libdrm -o o1buffer.o o1buffer.cpp
|
||||||
|
|
||||||
|
#Build USB Call Handler
|
||||||
|
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DLIBRADOR_LIBRARY -DPLATFORM_LINUX -I. -I../../../Desktop_Interface -I../../../Desktop_Interface/build_linux/libusb -I../../../Desktop_Interface/build_linux/libdfuprog/include -I. -isystem /usr/include/libdrm -I/home/esposch/Qt/5.10.0/gcc_64/mkspecs/linux-g++ -o usbcallhandler.o usbcallhandler.cpp
|
||||||
|
|
||||||
|
#???
|
||||||
|
rm -f librador.so.1.0.0 librador.so librador.so.1 librador.so.1.0
|
||||||
|
|
||||||
|
#Build main shared lib
|
||||||
|
g++ -Wl,-O1 -Wl,-rpath,/home/esposch/Qt/5.10.0/gcc_64/lib -shared -Wl,-soname,librador.so.1 -o librador.so.1.0.0 librador.o o1buffer.o usbcallhandler.o -L../../../Desktop_Interface/build_linux/libusb -lusb-1.0 -L../../../Desktop_Interface/build_linux/libdfuprog/lib/x64 -ldfuprog-0.9 -lGL -lpthread
|
||||||
|
|
||||||
|
#make symbolic links
|
||||||
|
ln -s librador.so.1.0.0 librador.so
|
||||||
|
ln -s librador.so.1.0.0 librador.so.1
|
||||||
|
ln -s librador.so.1.0.0 librador.so.1.0
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "usbcallhandler.h"
|
#include "usbcallhandler.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QThread>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
Librador::Librador()
|
Librador::Librador()
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
#define LIBRADOR_H
|
#define LIBRADOR_H
|
||||||
|
|
||||||
#include "librador_global.h"
|
#include "librador_global.h"
|
||||||
|
#include <vector>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
int LIBRADORSHARED_EXPORT librador_init();
|
int LIBRADORSHARED_EXPORT librador_init();
|
||||||
int LIBRADORSHARED_EXPORT librador_exit();
|
int LIBRADORSHARED_EXPORT librador_exit();
|
||||||
|
@ -39,7 +41,7 @@ uint8_t LIBRADORSHARED_EXPORT librador_get_device_firmware_variant();
|
||||||
|
|
||||||
std::vector<double> * LIBRADORSHARED_EXPORT librador_get_analog_data(int channel, double timeWindow_seconds, double sample_rate_hz, double delay_seconds, int filter_mode);
|
std::vector<double> * LIBRADORSHARED_EXPORT librador_get_analog_data(int channel, double timeWindow_seconds, double sample_rate_hz, double delay_seconds, int filter_mode);
|
||||||
std::vector<double> * LIBRADORSHARED_EXPORT librador_get_analog_data_sincelast(int channel, double timeWindow_max_seconds, double sample_rate_hz, double delay_seconds, int filter_mode);
|
std::vector<double> * LIBRADORSHARED_EXPORT librador_get_analog_data_sincelast(int channel, double timeWindow_max_seconds, double sample_rate_hz, double delay_seconds, int filter_mode);
|
||||||
std::vector<uint8_t> * librador_get_digital_data(int channel, double timeWindow_seconds, double sample_rate_hz, double delay_seconds);
|
std::vector<uint8_t> * LIBRADORSHARED_EXPORT librador_get_digital_data(int channel, double timeWindow_seconds, double sample_rate_hz, double delay_seconds);
|
||||||
|
|
||||||
//TODO: flashFirmware();
|
//TODO: flashFirmware();
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
#ifndef LIBRADOR_GLOBAL_H
|
#ifndef LIBRADOR_GLOBAL_H
|
||||||
#define LIBRADOR_GLOBAL_H
|
#define LIBRADOR_GLOBAL_H
|
||||||
|
|
||||||
|
#ifdef FORCE_COMPILATION_FOR_QT5
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
#else
|
||||||
|
#ifdef _WIN32 | _WIN64
|
||||||
|
#define Q_DECL_EXPORT __declspec(dllexport)
|
||||||
|
#define Q_DECL_IMPORT __declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define Q_DECL_EXPORT
|
||||||
|
#define Q_DECL_IMPORT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBRADOR_LIBRARY)
|
#if defined(LIBRADOR_LIBRARY)
|
||||||
# define LIBRADORSHARED_EXPORT Q_DECL_EXPORT
|
# define LIBRADORSHARED_EXPORT Q_DECL_EXPORT
|
||||||
|
|
Loading…
Reference in New Issue