summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-05-10 05:10:00 +0200
committerLouis Burda <quent.burda@gmail.com>2024-05-10 05:10:00 +0200
commitd9d200dbe38f62844e5ddb885e1778a888669c18 (patch)
tree7a614e4ec259d3316c94e521a11a7c303b022121 /Makefile
downloadprocdump-master.tar.gz
procdump-master.zip
Add initial versionHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..012f577
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+PREFIX ?= /usr/local
+BINDIR ?= /bin
+
+ifeq ($(DEBUG),1)
+CFLAGS = -Og -g
+else
+CFLAGS = -O3
+endif
+
+all: procdump
+
+procdump: procdump.c
+ gcc -o $@ $< $(CFLAGS)
+
+clean:
+ rm -f procdump
+
+install:
+ install -m755 procdump -t "$(DESTDIR)$(PREFIX)$(BINDIR)"
+
+uninstall:
+ rm -f "$(DESTDIR)$(PREFIX)$(BINDIR)/procdump"
+
+.PHONY: all install uninstall