Skip to content

Commit

Permalink
Modularise imagewriter.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Oct 15, 2024
1 parent ecd8077 commit 3020705
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 29 deletions.
25 changes: 2 additions & 23 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,6 @@
"./lib/decoders/fluxdecoder.cc",
"./lib/decoders/fmmfm.cc",
"./lib/encoders/encoders.cc",
"./lib/imagereader/d64imagereader.cc",
"./lib/imagereader/d88imagereader.cc",
"./lib/imagereader/dimimagereader.cc",
"./lib/imagereader/diskcopyimagereader.cc",
"./lib/imagereader/fdiimagereader.cc",
"./lib/imagereader/imagereader.cc",
"./lib/imagereader/imdimagereader.cc",
"./lib/imagereader/imgimagereader.cc",
"./lib/imagereader/jv3imagereader.cc",
"./lib/imagereader/nfdimagereader.cc",
"./lib/imagereader/nsiimagereader.cc",
"./lib/imagereader/td0imagereader.cc",
"./lib/imagewriter/d64imagewriter.cc",
"./lib/imagewriter/d88imagewriter.cc",
"./lib/imagewriter/diskcopyimagewriter.cc",
"./lib/imagewriter/imagewriter.cc",
"./lib/imagewriter/imdimagewriter.cc",
"./lib/imagewriter/imgimagewriter.cc",
"./lib/imagewriter/ldbsimagewriter.cc",
"./lib/imagewriter/nsiimagewriter.cc",
"./lib/imagewriter/rawimagewriter.cc",
"./lib/readerwriter.cc",
"./arch/aeslanier/decoder.cc",
"./arch/agat/agat.cc",
Expand Down Expand Up @@ -114,8 +93,6 @@
"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/imagereader/imagereader.h": "./lib/imagereader/imagereader.h",
"lib/imagewriter/imagewriter.h": "./lib/imagewriter/imagewriter.h",
"lib/readerwriter.h": "./lib/readerwriter.h",
},
deps=[
Expand All @@ -133,6 +110,8 @@
"lib/external",
"lib/fluxsink",
"lib/fluxsource",
"lib/imagereader",
"lib/imagewriter",
],
)

Expand Down
2 changes: 1 addition & 1 deletion lib/fluxsink/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"./vcdfluxsink.cc",
],
hdrs={"lib/fluxsink/fluxsink.h": "./fluxsink.h"},
deps=["lib/core", "lib/config", "lib/data", "lib/external","lib/usb"],
deps=["lib/core", "lib/config", "lib/data", "lib/external", "lib/usb"],
)
2 changes: 1 addition & 1 deletion lib/fluxsource/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
"./testpatternfluxsource.cc",
],
hdrs={"lib/fluxsource/fluxsource.h": "./fluxsource.h"},
deps=["lib/core","lib/data","lib/external","lib/usb",".+proto_lib"]
deps=["lib/core", "lib/data", "lib/external", "lib/usb", ".+proto_lib"],
)
21 changes: 21 additions & 0 deletions lib/imagereader/build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from build.protobuf import proto, protocc
from build.c import cxxlibrary

proto(
name="proto",
Expand All @@ -10,3 +11,23 @@
srcs=[".+proto"],
deps=["lib+common_proto_lib"],
)

cxxlibrary(
name="imagereader",
srcs=[
"./d64imagereader.cc",
"./d88imagereader.cc",
"./dimimagereader.cc",
"./diskcopyimagereader.cc",
"./fdiimagereader.cc",
"./imagereader.cc",
"./imdimagereader.cc",
"./imgimagereader.cc",
"./jv3imagereader.cc",
"./nfdimagereader.cc",
"./nsiimagereader.cc",
"./td0imagereader.cc",
],
hdrs={"lib/imagereader/imagereader.h": "./imagereader.h"},
deps=["lib/core", "lib/config", "lib/data", ".+proto_lib"],
)
20 changes: 20 additions & 0 deletions lib/imagewriter/build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from build.protobuf import proto, protocc
from build.c import cxxlibrary

proto(
name="proto",
Expand All @@ -10,3 +11,22 @@
srcs=[".+proto"],
deps=["lib+common_proto_lib", "lib/imagereader+proto_lib"],
)

cxxlibrary(
name="imagewriter",
srcs=[
"./d64imagewriter.cc",
"./d88imagewriter.cc",
"./diskcopyimagewriter.cc",
"./imagewriter.cc",
"./imdimagewriter.cc",
"./imgimagewriter.cc",
"./ldbsimagewriter.cc",
"./nsiimagewriter.cc",
"./rawimagewriter.cc",
],
hdrs={
"lib/imagewriter/imagewriter.h": "./imagewriter.h",
},
deps=["lib/core", "lib/data", "lib/external", ".+proto_lib"],
)
2 changes: 0 additions & 2 deletions lib/imagewriter/nsiimagewriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
#include "lib/config/flags.h"
#include "lib/data/sector.h"
#include "lib/imagewriter/imagewriter.h"
#include "lib/decoders/decoders.h"
#include "lib/data/image.h"
#include "lib/core/logger.h"
#include "arch/northstar/northstar.h"
#include "lib/imagewriter/imagewriter.pb.h"
#include <algorithm>
#include <iostream>
Expand Down
3 changes: 1 addition & 2 deletions lib/imagewriter/rawimagewriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
#include "lib/config/flags.h"
#include "lib/data/sector.h"
#include "lib/imagewriter/imagewriter.h"
#include "lib/decoders/decoders.h"
#include "lib/data/image.h"
#include "lib/data/flux.h"
#include "lib/core/logger.h"
#include "arch/northstar/northstar.h"
#include "lib/imagewriter/imagewriter.pb.h"
#include <algorithm>
#include <iostream>
Expand Down

0 comments on commit 3020705

Please sign in to comment.