summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..6fbd1c1
--- /dev/null
+++ b/makefile
@@ -0,0 +1,31 @@
+PREFIX = /usr/local
+
+X11INC = /usr/X11R6/include
+X11LIB = /usr/X11R6/lib
+
+INCS = -I$(X11INC)
+LIBS = -L$(X11LIB) -lX11
+
+CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L
+CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os $(INCS) $(CPPFLAGS)
+LDFLAGS = $(LIBS)
+
+CC = cc
+
+all: piss
+
+piss: src/daemon.c
+ $(CC) $(CFLAGS) -o piss src/daemon.c $(LDFLAGS)
+
+clean:
+ rm -f piss
+
+install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f piss $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/piss
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/piss
+
+.PHONY: all clean install uninstall