Makefile: fix PHONYness of existing recipes and make non-PHONY recipes
This commit is contained in:
parent
c237af0e37
commit
a1b29bb6ed
50
Makefile
50
Makefile
@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
# Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
||||||
# Copyright (c) 2023 DTB <trinity@trinity.moe>
|
# Copyright (c) 2023–2024 DTB <trinity@trinity.moe>
|
||||||
# Copyright (c) 2023 Sasha Koshka <sashakoshka@tebibyte.media>
|
# Copyright (c) 2023 Sasha Koshka <sashakoshka@tebibyte.media>
|
||||||
# SPDX-License-Identifier: FSFAP
|
# SPDX-License-Identifier: FSFAP
|
||||||
#
|
#
|
||||||
@ -60,27 +60,43 @@ libgetopt: src/getopt-rs/lib.rs
|
|||||||
$(RUSTC) $(RUSTCFLAGS) --crate-type=lib --crate-name=getopt \
|
$(RUSTC) $(RUSTCFLAGS) --crate-type=lib --crate-name=getopt \
|
||||||
-o build/o/libgetopt.rlib src/getopt-rs/lib.rs
|
-o build/o/libgetopt.rlib src/getopt-rs/lib.rs
|
||||||
|
|
||||||
dj: src/dj.c build
|
.PHONY: dj
|
||||||
$(CC) $(CFLAGS) -o build/bin/dj src/dj.c
|
dj: build/bin/dj
|
||||||
|
build/bin/dj: src/dj.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/dj.c
|
||||||
|
|
||||||
false: src/false.c build
|
.PHONY: false
|
||||||
$(CC) $(CFLAGS) -o build/bin/false src/false.c
|
false: build/bin/false
|
||||||
|
build/bin/false: src/false.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/false.c
|
||||||
|
|
||||||
fop: src/fop.rs build libgetopt sysexits
|
.PHONY: fop
|
||||||
|
fop: build/bin/fop
|
||||||
|
build/bin/fop: src/fop.rs build libgetopt sysexits
|
||||||
$(RUSTC) $(RUSTFLAGS) --extern getopt=build/o/libgetopt.rlib \
|
$(RUSTC) $(RUSTFLAGS) --extern getopt=build/o/libgetopt.rlib \
|
||||||
-o build/bin/fop src/fop.rs
|
-o $@ src/fop.rs
|
||||||
|
|
||||||
intcmp: src/intcmp.c build
|
.PHONY: intcmp
|
||||||
$(CC) $(CFLAGS) -o build/bin/intcmp src/intcmp.c
|
intcmp: build/bin/intcmp
|
||||||
|
build/bin/intcmp: src/intcmp.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/intcmp.c
|
||||||
|
|
||||||
scrut: src/scrut.c build
|
.PHONY: scrut
|
||||||
$(CC) $(CFLAGS) -o build/bin/scrut src/scrut.c
|
scrut: build/bin/scrut
|
||||||
|
build/bin/scrut: src/scrut.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/scrut.c
|
||||||
|
|
||||||
str: src/str.c build
|
.PHONY: str
|
||||||
$(CC) $(CFLAGS) -o build/bin/str src/str.c
|
str: build/bin/str
|
||||||
|
build/bin/str: src/str.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/str.c
|
||||||
|
|
||||||
strcmp: src/strcmp.c build
|
.PHONY: strcmp
|
||||||
$(CC) $(CFLAGS) -o build/bin/strcmp src/strcmp.c
|
strcmp: build/bin/strcmp
|
||||||
|
build/bin/strcmp: src/strcmp.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/strcmp.c
|
||||||
|
|
||||||
true: src/true.c build
|
.PHONY: true
|
||||||
$(CC) $(CFLAGS) -o build/bin/true src/true.c
|
true: build/bin/true
|
||||||
|
build/bin/true: src/true.c build
|
||||||
|
$(CC) $(CFLAGS) -o $@ src/true.c
|
||||||
|
Loading…
Reference in New Issue
Block a user