Skip to content

Commit

Permalink
Finally eliminate the +lib target.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Oct 19, 2024
1 parent 3c67a67 commit ed604f6
Show file tree
Hide file tree
Showing 19 changed files with 43 additions and 49 deletions.
30 changes: 0 additions & 30 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,6 @@

clibrary(name="protocol", hdrs={"protocol.h": "./protocol.h"})

cxxlibrary(
name="lib",
srcs=[
"./lib/readerwriter.cc",
],
hdrs={
"lib/readerwriter.h": "./lib/readerwriter.h",
},
deps=[
"+fmt_lib",
"+protocol",
"dep/adflib",
"dep/fatfs",
"dep/hfsutils",
"dep/libusbp",
"dep/stb",
"src/formats",
"lib/core",
"lib/config",
"lib/data",
"lib/external",
"lib/fluxsink",
"lib/fluxsource",
"lib/imagereader",
"lib/imagewriter",
"lib/decoders",
"lib/encoders",
],
)

corpustests = []
if not glob("../fluxengine-testdata/data"):
print("fluxengine-testdata not found; skipping corpus tests")
Expand Down
21 changes: 21 additions & 0 deletions lib/algorithms/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from build.c import cxxlibrary

cxxlibrary(
name="algorithms",
srcs=["./readerwriter.cc"],
hdrs={
"lib/algorithms/readerwriter.h": "./readerwriter.h",
},
deps=[
"lib/core",
"lib/config",
"lib/data",
"lib/usb",
"lib/encoders",
"lib/decoders",
"lib/fluxsource",
"lib/fluxsink",
"lib/imagereader",
"lib/imagewriter",
],
)
2 changes: 1 addition & 1 deletion lib/readerwriter.cc → lib/algorithms/readerwriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "lib/config/config.h"
#include "lib/config/flags.h"
#include "lib/data/fluxmap.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "protocol.h"
#include "lib/usb/usb.h"
#include "lib/encoders/encoders.h"
Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion lib/vfs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@
"lib/vfs/vfs.h": "./vfs.h",
},
deps=[
"+lib",
"+fmt_lib",
"arch",
"lib/algorithms",
".+proto_lib",
"dep/hfsutils",
"dep/adflib",
"dep/fatfs",
],
)
2 changes: 1 addition & 1 deletion lib/vfs/fluxsectorinterface.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lib/core/globals.h"
#include "lib/vfs/sectorinterface.h"
#include "lib/data/image.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/decoders/decoders.h"
#include "lib/fluxsource/fluxsource.h"
#include "lib/data/layout.h"
Expand Down
2 changes: 1 addition & 1 deletion src/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
cflags=["-I."],
deps=[
"+fmt_lib",
"+lib",
"+protobuf_lib",
"+protocol",
"+z_lib",
Expand All @@ -46,6 +45,7 @@
"lib/data",
"lib/external",
"lib/vfs",
"lib/algorithms",
"arch",
"src/formats",
],
Expand Down
2 changes: 1 addition & 1 deletion src/fe-putfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "lib/data/fluxmap.h"
#include "lib/data/sector.h"
#include "lib/config/proto.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/imagereader/imagereader.h"
#include "lib/imagewriter/imagewriter.h"
#include "lib/fluxsource/fluxsource.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fe-rawread.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lib/core/globals.h"
#include "lib/config/config.h"
#include "lib/config/flags.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/data/fluxmap.h"
#include "lib/decoders/decoders.h"
#include "lib/data/sector.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fe-rawwrite.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lib/core/globals.h"
#include "lib/config/config.h"
#include "lib/config/flags.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/data/fluxmap.h"
#include "lib/data/sector.h"
#include "lib/config/proto.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fe-read.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lib/core/globals.h"
#include "lib/config/config.h"
#include "lib/config/flags.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/data/fluxmap.h"
#include "lib/decoders/decoders.h"
#include "lib/data/sector.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fe-write.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lib/core/globals.h"
#include "lib/config/config.h"
#include "lib/config/flags.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/data/fluxmap.h"
#include "lib/decoders/decoders.h"
#include "lib/encoders/encoders.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fileutils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "lib/data/fluxmap.h"
#include "lib/data/sector.h"
#include "lib/config/proto.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/fluxsource/fluxsource.h"
#include "lib/fluxsink/fluxsink.h"
#include "lib/imagereader/imagereader.h"
Expand Down
1 change: 0 additions & 1 deletion src/gui/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"dep/hfsutils",
"dep/libusbp",
"extras+icons",
"+lib",
"lib/core",
"lib/data",
"lib/vfs",
Expand Down
2 changes: 1 addition & 1 deletion src/gui/drivetypes/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
cxxlibrary(
name="drivetypes",
srcs=[".+drivetypes_cc", ".+drivetypes_table_cc"],
deps=["+lib"],
deps=["lib/core", "lib/config"],
)
2 changes: 1 addition & 1 deletion src/gui/imagerpanel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "lib/encoders/encoders.h"
#include "lib/decoders/decoders.h"
#include "lib/config/proto.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "gui.h"
#include "lib/data/layout.h"
#include "fluxviewerwindow.h"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "lib/config/proto.h"
#include "gui.h"
#include "lib/core/logger.h"
#include "lib/readerwriter.h"
#include "lib/algorithms/readerwriter.h"
#include "lib/fluxsource/fluxsource.h"
#include "lib/fluxsink/fluxsink.h"
#include "lib/imagereader/imagereader.h"
Expand Down
3 changes: 1 addition & 2 deletions tests/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
deps=[
"lib/external+fl2_proto_lib",
"+fmt_lib",
"+lib",
"+protobuf_lib",
"+protocol",
"+z_lib",
Expand Down Expand Up @@ -84,7 +83,6 @@
deps=[
"lib/external+fl2_proto_lib",
"+fmt_lib",
"+lib",
"+protobuf_lib",
"+protocol",
"+z_lib",
Expand All @@ -96,6 +94,7 @@
"dep/libusbp",
"dep/snowhouse",
"dep/stb",
"lib/algorithms",
"lib/config",
"lib/core",
"lib/data",
Expand Down
8 changes: 5 additions & 3 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
srcs=["./brother120tool.cc"],
deps=[
"+fmt_lib",
"+lib",
"+protobuf_lib",
"+z_lib",
"lib/config",
"lib/core",
"lib/data",
"lib/fluxsource+proto_lib",
"lib/algorithms",
"src/formats",
]
+ emu,
)
Expand All @@ -26,13 +27,14 @@
srcs=["./brother240tool.cc"],
deps=[
"+fmt_lib",
"+lib",
"+protobuf_lib",
"+z_lib",
"lib/config",
"lib/core",
"lib/data",
"lib/fluxsource+proto_lib",
"lib/algorithms",
"src/formats",
]
+ emu,
)
Expand All @@ -42,7 +44,6 @@
srcs=["./upgrade-flux-file.cc"],
deps=[
"+fmt_lib",
"+lib",
"+protobuf_lib",
"+protocol",
"+sqlite3_lib",
Expand All @@ -53,6 +54,7 @@
"lib/data",
"lib/external+fl2_proto_lib",
"lib/fluxsource+proto_lib",
"lib/algorithms",
"src/formats",
],
)

0 comments on commit ed604f6

Please sign in to comment.