mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
It now builds properly!
This commit is contained in:
@@ -31,41 +31,54 @@ def proto(self, name, srcs: Targets = [], deps: Targets = []):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
dirs = sorted({"$[dir]/" + dirname(f) for f in filenamesof(srcs)})
|
if srcs:
|
||||||
simplerule(
|
dirs = sorted({"$[dir]/" + dirname(f) for f in filenamesof(srcs)})
|
||||||
replaces=self,
|
simplerule(
|
||||||
ins=srcs,
|
replaces=self,
|
||||||
outs=[f"={self.localname}.descriptor"],
|
ins=srcs,
|
||||||
deps=protodeps,
|
outs=[f"={self.localname}.descriptor"],
|
||||||
commands=(
|
deps=protodeps,
|
||||||
["mkdir -p " + (" ".join(dirs))]
|
commands=(
|
||||||
+ [f"$(CP) {f} $[dir]/{f}" for f in filenamesof(srcs)]
|
["mkdir -p " + (" ".join(dirs))]
|
||||||
+ [
|
+ [f"$(CP) {f} $[dir]/{f}" for f in filenamesof(srcs)]
|
||||||
"cd $[dir] && "
|
+ [
|
||||||
+ (
|
"cd $[dir] && "
|
||||||
" ".join(
|
+ (
|
||||||
[
|
" ".join(
|
||||||
"$(PROTOC)",
|
[
|
||||||
"--proto_path=.",
|
"$(PROTOC)",
|
||||||
"--include_source_info",
|
"--proto_path=.",
|
||||||
f"--descriptor_set_out={self.localname}.descriptor",
|
"--include_source_info",
|
||||||
]
|
f"--descriptor_set_out={self.localname}.descriptor",
|
||||||
+ (
|
]
|
||||||
[f"--descriptor_set_in={descriptorlist}"]
|
+ (
|
||||||
if descriptorlist
|
[f"--descriptor_set_in={descriptorlist}"]
|
||||||
else []
|
if descriptorlist
|
||||||
|
else []
|
||||||
|
)
|
||||||
|
+ ["$[ins]"]
|
||||||
)
|
)
|
||||||
+ ["$[ins]"]
|
|
||||||
)
|
)
|
||||||
)
|
]
|
||||||
]
|
),
|
||||||
),
|
label="PROTO",
|
||||||
label="PROTO",
|
args={
|
||||||
args={
|
"protosrcs": filenamesof(srcs),
|
||||||
"protosrcs": filenamesof(srcs),
|
"protodeps": set(protodeps) | {self},
|
||||||
"protodeps": set(protodeps) | {self},
|
},
|
||||||
},
|
)
|
||||||
)
|
else:
|
||||||
|
simplerule(
|
||||||
|
replaces=self,
|
||||||
|
ins=protodeps,
|
||||||
|
outs=["=stamp"],
|
||||||
|
commands=["touch $[outs]"],
|
||||||
|
label="PROTO",
|
||||||
|
args={
|
||||||
|
"protosrcs": [],
|
||||||
|
"protodeps": set(protodeps),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ cxxlibrary(
|
|||||||
"fmt/printf.h": "./include/fmt/printf.h",
|
"fmt/printf.h": "./include/fmt/printf.h",
|
||||||
"fmt/ranges.h": "./include/fmt/ranges.h",
|
"fmt/ranges.h": "./include/fmt/ranges.h",
|
||||||
"fmt/std.h": "./include/fmt/std.h",
|
"fmt/std.h": "./include/fmt/std.h",
|
||||||
"fmt/xchar.h": "./include/fmt/xchar.h"
|
"fmt/xchar.h": "./include/fmt/xchar.h",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ destfile=$dir/dest.img
|
|||||||
|
|
||||||
dd if=/dev/urandom of=$srcfile bs=1048576 count=2 2>&1
|
dd if=/dev/urandom of=$srcfile bs=1048576 count=2 2>&1
|
||||||
|
|
||||||
|
echo $fluxengine write $format -i $srcfile -d $fluxfile --drive.rotational_period_ms=200 $flags
|
||||||
$fluxengine write $format -i $srcfile -d $fluxfile --drive.rotational_period_ms=200 $flags
|
$fluxengine write $format -i $srcfile -d $fluxfile --drive.rotational_period_ms=200 $flags
|
||||||
|
echo $fluxengine read $format -s $fluxfile -o $destfile --drive.rotational_period_ms=200 $flags
|
||||||
$fluxengine read $format -s $fluxfile -o $destfile --drive.rotational_period_ms=200 $flags
|
$fluxengine read $format -s $fluxfile -o $destfile --drive.rotational_period_ms=200 $flags
|
||||||
if [ ! -s $destfile ]; then
|
if [ ! -s $destfile ]; then
|
||||||
echo "Zero length output file!" >&2
|
echo "Zero length output file!" >&2
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ endif
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
extrasrcs = []
|
extrasrcs = ["./layout.cpp"]
|
||||||
if config.windows:
|
if config.windows:
|
||||||
extrasrcs += [
|
extrasrcs += [
|
||||||
simplerule(
|
simplerule(
|
||||||
@@ -31,9 +31,7 @@ if config.windows:
|
|||||||
|
|
||||||
cxxprogram(
|
cxxprogram(
|
||||||
name="gui",
|
name="gui",
|
||||||
srcs=glob("*.c", root_dir="src/gui") +
|
srcs=glob("src/gui/*.cc") + glob("src/gui/*.h") + extrasrcs,
|
||||||
glob("*.h", root_dir="src/gui")
|
|
||||||
+ extrasrcs,
|
|
||||||
cflags=["$(WX_CFLAGS)"],
|
cflags=["$(WX_CFLAGS)"],
|
||||||
ldflags=["$(WX_LDFLAGS)"],
|
ldflags=["$(WX_LDFLAGS)"],
|
||||||
deps=[
|
deps=[
|
||||||
|
|||||||
Reference in New Issue
Block a user