From 2aaa9bbecea6ab32bd1fe1b6470e24703405e2a7 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 28 Sep 2026 11:15:28 -0300 Subject: yeah i think it has no bugs --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ac37253 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +CC = gcc +CFLAGS = -Wall -Wextra -O2 -pipe +LDLIBS = +TARGET = timetolocal +SRC = $(wildcard *.c) +OBJ = $(SRC:src/%.c=obj/%.o) +PREFIX = /usr/local + +all: $(TARGET) + +$(TARGET): $(OBJ) + @mkdir -p $(@D) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LDLIBS) + +install: $(TARGET) + install -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET)) + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET)) + +obj/%.o: src/%.c + @mkdir -p $(@D) + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + rm -rf obj/ $(TARGET) -- cgit v1.3-2-g0d8e