aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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..d205b70
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+all: sxiv
+
+CC?=gcc
+PREFIX?=/usr/local
+CFLAGS+= -Wall -pedantic -g
+LDFLAGS+=
+LIBS+=
+
+SRCFILES=$(wildcard *.c)
+OBJFILES=$(SRCFILES:.c=.o)
+
+physlock: $(OBJFILES)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+%.o: %.c Makefile
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+install: all
+ install -D -m 4755 -o root -g root sxiv $(PREFIX)/sbin/sxiv
+
+clean:
+ rm -f sxiv *.o
+
+tags: *.h *.c
+ ctags $^
+
+cscope: *.h *.c
+ cscope -b