6a30e67411
One can now type: ``` $> make ``` Which builds all the modules and places them in a `out/` directory of the project root for easy finding. Alternatively one can type: ``` $> make $module ``` Where `$module` is one of the `imag-$module` names, such as `counter`, `link`, etc. To clean up the `out/` directory it's `$> make clean`
38 lines
567 B
Makefile
38 lines
567 B
Makefile
toml = imag-$@/Cargo.toml
|
|
bin = imag-$@/target/debug/imag-$@
|
|
|
|
default: all
|
|
|
|
.PHONY: clean
|
|
|
|
all: counter link notes store tag view
|
|
|
|
counter: prep
|
|
cargo build --manifest-path $(toml)
|
|
cp $(bin) out/
|
|
|
|
link: prep
|
|
cargo build --manifest-path $(toml)
|
|
cp $(bin) out/
|
|
|
|
notes: prep
|
|
cargo build --manifest-path $(toml)
|
|
cp $(bin) out/
|
|
|
|
store: prep
|
|
cargo build --manifest-path $(toml)
|
|
cp $(bin) out/
|
|
|
|
tag: prep
|
|
cargo build --manifest-path $(toml)
|
|
cp $(bin) out/
|
|
|
|
view: prep
|
|
cargo build --manifest-path $(toml)
|
|
cp $(bin) out/
|
|
|
|
prep:
|
|
mkdir -p out/
|
|
|
|
clean:
|
|
rm -rf out/
|