From c856ca9339e7154699a8ac81ec943d45d8c5ffe8 Mon Sep 17 00:00:00 2001 From: Victor Mignot Date: Wed, 18 Feb 2026 08:16:09 +0100 Subject: Implement `true` and `false` --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c8010d2 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +CC := gcc +CFLAGS := +CFLAGS_EXTRA := -std=c23 -Wpedantic -Wall -Wextra +LDFLAGS := +PREFIX := +UTILS := true false + +BIN := futiles +OBJS := $(patsubst %.c, %.o, $(wildcard src/*.c)) + +all: $(BIN) + +$(BIN): $(OBJS) + $(CC) -o $@ $(CFLAGS) $(CFLAGS_EXTRA) $(LDFLAGS) $^ + +src/%.o: src/%.c + $(CC) -c -o $@ $(CFLAGS) $(CFLAGS_EXTRA) $< + +clean: + rm -f $(BIN) $(OBJS) + +install: $(BIN) + install -m 755 $(BIN) $(PREFIX)/bin/ + for util in $(UTILS) ; do \ + ln -sf futiles /usr/bin/$$util; \ + done + +.PHONY: clean install -- cgit v1.2.3