summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile26
-rw-r--r--ayylmao.c9
2 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3c47d5a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+.PHONY: all install install-dynamic install-static clean
+
+PREFIX = $(HOME)/.local
+
+CC = clang
+CFLAGS = -std=c90 -Weverything -I $(PREFIX)/include
+LDFLAGS = -L $(PREFIX)/lib -l ayylmao
+
+all : ayylmao.dynamic ayylmao.static
+
+install: install-dynamic
+
+install-dynamic : ayylmao.dynamic
+ install -m 0755 ayylmao.dynamic $(PREFIX)/bin/ayylmao
+
+install-static : ayylmao.static
+ install -m 0755 ayylmao.static $(PREFIX)/bin/ayylmao
+
+clean :
+ rm -f -- ayylmao.dynamic ayylmao.static
+
+ayylmao.dynamic : ayylmao.c
+ $(CC) ayylmao.c -o ayylmao.dynamic $(CFLAGS) $(LDFLAGS)
+
+ayylmao.static : ayylmao.c
+ $(CC) -static ayylmao.c -o ayylmao.static $(CFLAGS) $(LDFLAGS)
diff --git a/ayylmao.c b/ayylmao.c
new file mode 100644
index 0000000..0490f99
--- /dev/null
+++ b/ayylmao.c
@@ -0,0 +1,9 @@
+#include <ayylmao.h>
+#include <stdlib.h>
+
+int main(void)
+{
+ ayy();
+ lmao();
+ exit(EXIT_SUCCESS);
+}