diff --git a/emulator/Makefile b/emulator/Makefile index 0ac97f3..8ed2861 100644 --- a/emulator/Makefile +++ b/emulator/Makefile @@ -24,7 +24,8 @@ INCLUDES:=$(addprefix -I,$(INCLUDES)) 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 @@ -35,9 +36,9 @@ LIBS+= Qt5Core Qt5Gui Qt5Widgets m stdc++ LDFLAGS= -static-libgcc -static-libstdc++ #-Wl,-t -Wl,--Map=a.map LDFLAGS+= -L$(QT_DIR) 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+= -L./libs/Pixy/windows +LDFLAGS+= -L$(LIB_DIR)/Pixy/windows LDFLAGS+= $(addprefix -l,$(LIBS)) #Finding Input files diff --git a/emulator/libs/Pixy/Makefile b/emulator/libs/Pixy/Makefile index 43338d4..ce804b6 100644 --- a/emulator/libs/Pixy/Makefile +++ b/emulator/libs/Pixy/Makefile @@ -22,7 +22,7 @@ CFLAGS=$(ARCH_FLAGS) -O0 -g #-ffunction-sections -fdata-sections -g #CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork #CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 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/ #Finding Input files diff --git a/emulator/libs/boost/.gitignore b/emulator/libs/boost/.gitignore new file mode 100644 index 0000000..349cf4e --- /dev/null +++ b/emulator/libs/boost/.gitignore @@ -0,0 +1,2 @@ +include +lib diff --git a/emulator/libs/boost/boost.rar b/emulator/libs/boost/boost.rar new file mode 100644 index 0000000..4a81107 Binary files /dev/null and b/emulator/libs/boost/boost.rar differ diff --git a/emulator/libs/boost/readme.txt b/emulator/libs/boost/readme.txt new file mode 100644 index 0000000..c853d2c --- /dev/null +++ b/emulator/libs/boost/readme.txt @@ -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 \ No newline at end of file diff --git a/emulator/readme_windows.txt b/emulator/readme_windows.txt new file mode 100644 index 0000000..b62ccd9 --- /dev/null +++ b/emulator/readme_windows.txt @@ -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 \ No newline at end of file