summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortsxv478 <atci39@rambler.ru>2024-06-19 06:28:46 +0300
committertsxv478 <atci39@rambler.ru>2024-06-19 06:28:46 +0300
commit0a1c24d45a2df5ffa70f38fe177aa7264eb2dfe7 (patch)
tree2cc6d494d23d43f7c2e32a60e6439355fab48a54 /Makefile
parentb861d3433dc56fe1d89594d8ccb3d13009de5778 (diff)
Code
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fb1fe46
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+VERSION = 0.1
+PREFIX = /usr/local
+CC = cc
+CPPFLAGS = -D_DEFAULT_SOURCE
+CFLAGS = --std=c99 -pedantic -Wall -Os
+LDFLAGS = -s -static
+
+all: note
+
+note: note.c
+
+install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f note $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/note
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/note
+
+clean:
+ rm -f note note-$(VERSION).tar.gz
+
+dist: clean
+ mkdir -p note-$(VERSION)
+ cp -R TODO Makefile config.h note.c note-$(VERSION)
+ tar -cf note-$(VERSION).tar note-$(VERSION)
+ gzip note-$(VERSION).tar
+ rm -rf note-$(VERSION)
+
+.c:
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
+
+.PHONY: all install uninstall clean dist