mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Modularise fluxsink and usb.
This commit is contained in:
20
build.py
20
build.py
@@ -26,13 +26,6 @@ cxxlibrary(
|
||||
"./lib/decoders/fluxdecoder.cc",
|
||||
"./lib/decoders/fmmfm.cc",
|
||||
"./lib/encoders/encoders.cc",
|
||||
"./lib/fluxsink/a2rfluxsink.cc",
|
||||
"./lib/fluxsink/aufluxsink.cc",
|
||||
"./lib/fluxsink/fl2fluxsink.cc",
|
||||
"./lib/fluxsink/fluxsink.cc",
|
||||
"./lib/fluxsink/hardwarefluxsink.cc",
|
||||
"./lib/fluxsink/scpfluxsink.cc",
|
||||
"./lib/fluxsink/vcdfluxsink.cc",
|
||||
"./lib/fluxsource/a2rfluxsource.cc",
|
||||
"./lib/fluxsource/cwffluxsource.cc",
|
||||
"./lib/fluxsource/dmkfluxsource.cc",
|
||||
@@ -67,13 +60,6 @@ cxxlibrary(
|
||||
"./lib/imagewriter/nsiimagewriter.cc",
|
||||
"./lib/imagewriter/rawimagewriter.cc",
|
||||
"./lib/readerwriter.cc",
|
||||
"./lib/usb/applesauceusb.cc",
|
||||
"./lib/usb/fluxengineusb.cc",
|
||||
"./lib/usb/greaseweazle.cc",
|
||||
"./lib/usb/greaseweazleusb.cc",
|
||||
"./lib/usb/serial.cc",
|
||||
"./lib/usb/usb.cc",
|
||||
"./lib/usb/usbfinder.cc",
|
||||
"./arch/aeslanier/decoder.cc",
|
||||
"./arch/agat/agat.cc",
|
||||
"./arch/agat/decoder.cc",
|
||||
@@ -140,15 +126,10 @@ cxxlibrary(
|
||||
"lib/decoders/fluxdecoder.h": "./lib/decoders/fluxdecoder.h",
|
||||
"lib/decoders/rawbits.h": "./lib/decoders/rawbits.h",
|
||||
"lib/encoders/encoders.h": "./lib/encoders/encoders.h",
|
||||
"lib/fluxsink/fluxsink.h": "./lib/fluxsink/fluxsink.h",
|
||||
"lib/fluxsource/fluxsource.h": "lib/fluxsource/fluxsource.h",
|
||||
"lib/imagereader/imagereader.h": "./lib/imagereader/imagereader.h",
|
||||
"lib/imagewriter/imagewriter.h": "./lib/imagewriter/imagewriter.h",
|
||||
"lib/readerwriter.h": "./lib/readerwriter.h",
|
||||
"lib/usb/applesauce.h": "./lib/usb/applesauce.h",
|
||||
"lib/usb/greaseweazle.h": "./lib/usb/greaseweazle.h",
|
||||
"lib/usb/usb.h": "./lib/usb/usb.h",
|
||||
"lib/usb/usbfinder.h": "./lib/usb/usbfinder.h",
|
||||
},
|
||||
deps=[
|
||||
"+fmt_lib",
|
||||
@@ -163,6 +144,7 @@ cxxlibrary(
|
||||
"lib/config",
|
||||
"lib/data",
|
||||
"lib/external",
|
||||
"lib/fluxsink",
|
||||
"lib/fluxsource+proto_lib",
|
||||
],
|
||||
)
|
||||
|
||||
11
lib/external/build.py
vendored
11
lib/external/build.py
vendored
@@ -7,22 +7,25 @@ protocc(name="fl2_proto_lib", srcs=[".+fl2_proto"])
|
||||
cxxlibrary(
|
||||
name="external",
|
||||
srcs=[
|
||||
"./ldbs.cc",
|
||||
"./fl2.cc",
|
||||
"./kryoflux.cc",
|
||||
"./catweasel.cc",
|
||||
"./csvreader.cc",
|
||||
"./fl2.cc",
|
||||
"./flx.cc",
|
||||
"./greaseweazle.cc",
|
||||
"./kryoflux.cc",
|
||||
"./ldbs.cc",
|
||||
],
|
||||
hdrs={
|
||||
"lib/external/a2r.h": "./a2r.h",
|
||||
"lib/external/applesauce.h": "./applesauce.h",
|
||||
"lib/external/catweasel.h": "./catweasel.h",
|
||||
"lib/external/csvreader.h": "./csvreader.h",
|
||||
"lib/external/fl2.h": "./fl2.h",
|
||||
"lib/external/flx.h": "./flx.h",
|
||||
"lib/external/greaseweazle.h": "./greaseweazle.h",
|
||||
"lib/external/kryoflux.h": "./kryoflux.h",
|
||||
"lib/external/ldbs.h": "./ldbs.h",
|
||||
"lib/external/scp.h": "./scp.h",
|
||||
"lib/external/flx.h": "./flx.h",
|
||||
},
|
||||
deps=["lib/core", ".+fl2_proto_lib", "lib/data"],
|
||||
)
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
from build.protobuf import proto, protocc
|
||||
from build.c import cxxlibrary
|
||||
|
||||
proto(name="proto", srcs=["./fluxsink.proto"], deps=["lib+common_proto"])
|
||||
|
||||
protocc(name="proto_lib", srcs=[".+proto"], deps=["lib+common_proto_lib"])
|
||||
|
||||
cxxlibrary(
|
||||
name="fluxsink",
|
||||
srcs=[
|
||||
"./a2rfluxsink.cc",
|
||||
"./aufluxsink.cc",
|
||||
"./fl2fluxsink.cc",
|
||||
"./fluxsink.cc",
|
||||
"./hardwarefluxsink.cc",
|
||||
"./scpfluxsink.cc",
|
||||
"./vcdfluxsink.cc",
|
||||
],
|
||||
hdrs={"lib/fluxsink/fluxsink.h": "./fluxsink.h"},
|
||||
deps=["lib/core", "lib/config", "lib/data", "lib/external","lib/usb"],
|
||||
)
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "lib/usb/usb.h"
|
||||
#include "lib/fluxsink/fluxsink.h"
|
||||
#include "lib/fluxsink/fluxsink.pb.h"
|
||||
#include "lib/readerwriter.h"
|
||||
|
||||
class HardwareFluxSink : public FluxSink
|
||||
{
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
from build.protobuf import proto, protocc
|
||||
from build.c import cxxlibrary
|
||||
|
||||
proto(name="proto", srcs=["./usb.proto"], deps=["lib+common_proto"])
|
||||
protocc(name="proto_lib", srcs=[".+proto"], deps=["lib+common_proto_lib"])
|
||||
|
||||
cxxlibrary(
|
||||
name="usb",
|
||||
srcs=[
|
||||
"./applesauceusb.cc",
|
||||
"./fluxengineusb.cc",
|
||||
"./greaseweazleusb.cc",
|
||||
"./serial.cc",
|
||||
"./usb.cc",
|
||||
"./usbfinder.cc",
|
||||
],
|
||||
hdrs={"lib/usb/usb.h": "./usb.h", "lib/usb/usbfinder.h": "./usbfinder.h"},
|
||||
deps=["lib/core", "lib/config", "lib/external", "dep/libusbp", "+protocol"],
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "lib/data/fluxmap.h"
|
||||
#include "lib/core/bytes.h"
|
||||
#include "lib/usb/usb.pb.h"
|
||||
#include "greaseweazle.h"
|
||||
#include "lib/external/greaseweazle.h"
|
||||
#include "serial.h"
|
||||
#include "usb.h"
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "lib/config/proto.h"
|
||||
#include "usbfinder.h"
|
||||
#include "lib/core/logger.h"
|
||||
#include "applesauce.h"
|
||||
#include "greaseweazle.h"
|
||||
#include "lib/external/applesauce.h"
|
||||
#include "lib/external/greaseweazle.h"
|
||||
|
||||
static USB* usb = NULL;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "usb.h"
|
||||
#include "lib/core/bytes.h"
|
||||
#include "usbfinder.h"
|
||||
#include "applesauce.h"
|
||||
#include "greaseweazle.h"
|
||||
#include "lib/external/applesauce.h"
|
||||
#include "lib/external/greaseweazle.h"
|
||||
#include "protocol.h"
|
||||
#include "libusbp.hpp"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "lib/core/globals.h"
|
||||
#include "lib/data/fluxmap.h"
|
||||
#include "lib/usb/greaseweazle.h"
|
||||
#include "lib/external/greaseweazle.h"
|
||||
|
||||
#define E28(val) \
|
||||
(1 | ((val) << 1) & 0xff), (1 | ((val) >> 6) & 0xff), \
|
||||
|
||||
Reference in New Issue
Block a user