mirror of
https://github.com/fhgwright/SCSI2SD.git
synced 2024-09-26 16:55:31 +00:00
Removed C++11 dependencies, and compile Windows binaries staically with mingw.
This commit is contained in:
parent
53fb77e7ad
commit
70a3b594c2
@ -18,7 +18,11 @@
|
||||
#ifndef Firmware_HH
|
||||
#define Firmware_HH
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
namespace SCSI2SD
|
||||
|
@ -2,12 +2,12 @@ VPATH=cybootloaderutils
|
||||
|
||||
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++
|
||||
@ -15,7 +15,7 @@ ifeq ($(TARGET),Win32)
|
||||
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++
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "SCSI2SD_Bootloader.hh"
|
||||
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
@ -20,7 +20,11 @@
|
||||
|
||||
#include "hidapi.h"
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
namespace SCSI2SD
|
||||
|
@ -20,7 +20,12 @@
|
||||
|
||||
#include "hidapi.h"
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace SCSI2SD
|
||||
|
@ -19,13 +19,22 @@
|
||||
#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;
|
||||
@ -84,8 +93,8 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
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++
|
||||
@ -15,7 +15,7 @@ ifeq ($(TARGET),Win32)
|
||||
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++
|
||||
|
@ -17,9 +17,16 @@
|
||||
|
||||
#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.
|
||||
@ -188,7 +195,7 @@ int main(int argc, char* argv[])
|
||||
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)
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
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++
|
||||
@ -15,7 +15,7 @@ ifeq ($(TARGET),Win32)
|
||||
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++
|
||||
|
Loading…
Reference in New Issue
Block a user