diff options
| author | david <[email protected]> | 2026-09-28 11:15:28 -0300 |
|---|---|---|
| committer | david <[email protected]> | 2026-09-28 11:15:28 -0300 |
| commit | 2aaa9bbecea6ab32bd1fe1b6470e24703405e2a7 (patch) | |
| tree | 3d0b159405c19f3e4f30e6b7d06bfc0627c6eca3 /Makefile | |
| download | timetolocal-2aaa9bbecea6ab32bd1fe1b6470e24703405e2a7.tar.gz timetolocal-2aaa9bbecea6ab32bd1fe1b6470e24703405e2a7.zip | |
yeah i think it has no bugs
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
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) |
