Cleaned up windows build, added readme. Added Boost binaries.

This commit is contained in:
t-moe
2015-06-06 14:29:37 +02:00
parent 0fa18290dd
commit 129b7e0ee7
6 changed files with 35 additions and 4 deletions

View File

@@ -24,7 +24,8 @@ INCLUDES:=$(addprefix -I,$(INCLUDES))
QT_LIB=$(QT_DIR)/libemulatorqt.a QT_LIB=$(QT_DIR)/libemulatorqt.a
CPPFLAGS= -march=x86-64 -mtune=generic -fPIC $(INCLUDES) CPPFLAGS= -march=x86-64 -mtune=generic #-fPIC
CPPFLAGS+= $(INCLUDES)
CFLAGS= -O0 -g -std=c99 CFLAGS= -O0 -g -std=c99
@@ -35,9 +36,9 @@ LIBS+= Qt5Core Qt5Gui Qt5Widgets m stdc++
LDFLAGS= -static-libgcc -static-libstdc++ #-Wl,-t -Wl,--Map=a.map LDFLAGS= -static-libgcc -static-libstdc++ #-Wl,-t -Wl,--Map=a.map
LDFLAGS+= -L$(QT_DIR) LDFLAGS+= -L$(QT_DIR)
LDFLAGS+= -L$(LIB_DIR)/Pixy LDFLAGS+= -L$(LIB_DIR)/Pixy
LDFLAGS+= -LC:/boost_1_58_0/buildsys/lib LDFLAGS+= -L$(LIB_DIR)/boost/lib
LDFLAGS+= -LC:/Qt/5.4/mingw491_32/lib LDFLAGS+= -LC:/Qt/5.4/mingw491_32/lib
LDFLAGS+= -L./libs/Pixy/windows LDFLAGS+= -L$(LIB_DIR)/Pixy/windows
LDFLAGS+= $(addprefix -l,$(LIBS)) LDFLAGS+= $(addprefix -l,$(LIBS))
#Finding Input files #Finding Input files

View File

@@ -22,7 +22,7 @@ CFLAGS=$(ARCH_FLAGS) -O0 -g #-ffunction-sections -fdata-sections -g
#CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork #CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork
#CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 #CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS+=-I/usr/include/libusb-1.0 CFLAGS+=-I/usr/include/libusb-1.0
CFLAGS+=-IC:/boost_1_58_0/buildsys/include/boost-1_58 CFLAGS+=-I../boost/include/
CFLAGS+=-I./windows/ CFLAGS+=-I./windows/
#Finding Input files #Finding Input files

2
emulator/libs/boost/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
include
lib

Binary file not shown.

View File

@@ -0,0 +1,2 @@
This directory is only needed on windows, and if you do not have boost installed.
Extract the rar file here, to get boost 1.58 header files and the libraries that we need for discoverpixy

View File

@@ -0,0 +1,26 @@
Prerequisites:
- Qt5 for Windows (provides C:\Qt\5.4\mingw491_32 and C:\Qt\Tools\mingw491_32)
- Mingw msys-base (provides C:\MinGW\msys\1.0 and make, find )
- Boost (check emulator\libs\boost)
Steps:
- Open up the msys shell using the batchfile
- Navigate to the emulator folder of the project
- Source the qt binaries (qmake, gcc, g++) by executing
export PATH=$PATH:/c/Qt/Tools/mingw491_32/bin:/c/Qt/5.4/mingw491_32/bin
- navigate to libs/Pixy and execute make
- navigate back into the emulator folder and execute make
- this should generate you build/emulator.exe
Starting:
- Extract windows_dlls.rar to the build folder
- Copy the emulated folder into the build folder
- Make sure that you installed the pixy usb driver (e.g. by installing pixymon http://cmucam.org/projects/cmucam5/wiki/Latest_release)
- Start emulator.exe
Pitfalls:
- libstdc++ must be provided by qt. do not use one of msys or mingw. you will waste hours with debugging of the make process
Sources:
- libusb for windows was taken from https://github.com/charmedlabs/pixy/tree/master/src/host/windows
- Boost was compiled from sources, using http://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/ and http://www.boost.org/doc/libs/1_58_0/more/getting_started/windows.html