aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordavid <[email protected]>2026-10-05 23:08:45 -0300
committerdavid <[email protected]>2026-10-05 23:08:45 -0300
commitcc232721ad21e4f714467c56dfe064207e77db61 (patch)
tree300bbf25ba353ad3d6fb582ce75d6d6d54de0289 /Makefile
parent0324a92037f1c830fa1c9e440024211d423dbea5 (diff)
downloadmikusays-c-cc232721ad21e4f714467c56dfe064207e77db61.tar.gz
mikusays-c-cc232721ad21e4f714467c56dfe064207e77db61.zip
rewrote basic functionality to C. there are no colors just yet
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
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"