From cc232721ad21e4f714467c56dfe064207e77db61 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 5 Oct 2026 23:08:45 -0300 Subject: rewrote basic functionality to C. there are no colors just yet --- 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..8509a27 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +CC = gcc +CFLAGS = -Wall -Wextra -O2 -pipe +TARGET = build/mikusays +SRC = $(wildcard src/*.c) +OBJ = $(SRC:%.c=obj/%.o) +PREFIX = /usr/local + +$(TARGET): $(OBJ) + @mkdir -p $(@D) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LDLIBS) + +install: $(TARGET) + mkdir -p $(DESTDIR)$(PREFIX)/bin + install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET)) + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET)) + +obj/%.o: %.c + @mkdir -p $(@D) + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + rm -f $(TARGET) $(OBJ) + +run: + make + build/mikusaysc "this is a test" -- cgit v1.3-2-g0d8e