#ifndef Firmware_HH
#define Firmware_HH
+#if __cplusplus >= 201103L
#include <cstdint>
+#else
+#include <stdint.h>
+#endif
#include <string>
namespace SCSI2SD
CPPFLAGS = -I cybootloaderutils -I hidapi/hidapi
CFLAGS += -Wall -Wno-pointer-sign -O2
-CXXFLAGS += -Wall -std=c++11 -O2
+CXXFLAGS += -Wall -O2
TARGET ?= $(shell uname -s)
ifeq ($(TARGET),Win32)
VPATH += hidapi/windows
- LDFLAGS += -mconsole -mwindows -lsetupapi
+ LDFLAGS += -static -mconsole -mwindows -lsetupapi
BUILD = build/windows/32bit
CC=i686-w64-mingw32-gcc
CXX=i686-w64-mingw32-g++
endif
ifeq ($(TARGET),Win64)
VPATH += hidapi/windows
- LDFLAGS += -mconsole -mwindows -lsetupapi
+ LDFLAGS += -static -mconsole -mwindows -lsetupapi
BUILD = build/windows/64bit
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
#include "SCSI2SD_Bootloader.hh"
-#include <cstdint>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include "hidapi.h"
+#if __cplusplus >= 201103L
#include <cstdint>
+#else
+#include <stdint.h>
+#endif
#include <string>
namespace SCSI2SD
#include "hidapi.h"
+#if __cplusplus >= 201103L
#include <cstdint>
+#else
+#include <stdint.h>
+#endif
+
#include <string>
namespace SCSI2SD
#include "SCSI2SD_Bootloader.hh"
#include "Firmware.hh"
+#if __cplusplus >= 201103L
#include <cstdint>
+#include <memory>
+using std::shared_ptr;
+#else
+#include <stdint.h>
+#include <tr1/memory>
+using std::tr1::shared_ptr;
+#endif
+
#include <iomanip>
#include <iostream>
-#include <memory>
#include <sstream>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
using namespace SCSI2SD;
}
// Enumerate and print the HID devices on the system
- std::shared_ptr<Bootloader> bootloader(Bootloader::Open());
- std::shared_ptr<HID> hid(HID::Open());
+ shared_ptr<Bootloader> bootloader(Bootloader::Open());
+ shared_ptr<HID> hid(HID::Open());
if (hid)
{
CPPFLAGS = -I ../bootloaderhost/hidapi/hidapi -I ../bootloaderhost
CFLAGS += -Wall -Wno-pointer-sign -O2
-CXXFLAGS += -Wall -std=c++11 -O2
+CXXFLAGS += -Wall -O2
VPATH += ../bootloaderhost
TARGET ?= $(shell uname -s)
ifeq ($(TARGET),Win32)
VPATH += hidapi/windows
- LDFLAGS += -mconsole -mwindows -lsetupapi -lws2_32
+ LDFLAGS += -static -mconsole -mwindows -lsetupapi -lws2_32
BUILD = build/windows/32bit
CC=i686-w64-mingw32-gcc
CXX=i686-w64-mingw32-g++
endif
ifeq ($(TARGET),Win64)
VPATH += hidapi/windows
- LDFLAGS += -mconsole -mwindows -lsetupapi -lws2_32
+ LDFLAGS += -static -mconsole -mwindows -lsetupapi -lws2_32
BUILD = build/windows/64bit
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
#include "SCSI2SD_HID.hh"
+#if __cplusplus >= 201103L
+#include <memory>
+using std::shared_ptr;
+#else
+#include <tr1/memory>
+using std::tr1::shared_ptr;
+#endif
+
#include <iomanip>
#include <iostream>
-#include <memory>
#include <sstream>
// Request extended stdio format macros.
HID::PRODUCT_ID);
// Enumerate and print the HID devices on the system
- std::shared_ptr<HID> scsi2sdHID(HID::Open());
+ shared_ptr<HID> scsi2sdHID(HID::Open());
if (!scsi2sdHID)
{
CPPFLAGS = -I ../bootloaderhost/hidapi/hidapi -I ../bootloaderhost
CFLAGS += -Wall -Wno-pointer-sign -O2
-CXXFLAGS += -Wall -std=c++11 -O2
+CXXFLAGS += -Wall -O2
VPATH += ../bootloaderhost
TARGET ?= $(shell uname -s)
ifeq ($(TARGET),Win32)
VPATH += hidapi/windows
- LDFLAGS += -mconsole -mwindows -lsetupapi -lws2_32
+ LDFLAGS += -static -mconsole -mwindows -lsetupapi -lws2_32
BUILD = build/windows/32bit
CC=i686-w64-mingw32-gcc
CXX=i686-w64-mingw32-g++
endif
ifeq ($(TARGET),Win64)
VPATH += hidapi/windows
- LDFLAGS += -mconsole -mwindows -lsetupapi -lws2_32
+ LDFLAGS += -static -mconsole -mwindows -lsetupapi -lws2_32
BUILD = build/windows/64bit
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++