--- /dev/null
+lackey - curses calendar program
+================================
+lackey is a lightweight terminal based calendar program
+
+
+Installation
+------------
+Create and edit config.mk as desired (see config.mk.example)
+
+Build and install lackey:
+
+ make
+ make install
+
+
+Running lackey
+--------------
+Start lackey from from a termainl:
+
+ lackey
+
+
+Hacking
+-------
+Common source files are in the src directory. Each Curses screen has it's own
+source file in the view directory and each calendar backend has a source file
+in the cal directory. The views and calendar backends are access though the
+view.c and cal.c files, respectively.
--- /dev/null
+.TH LACKY 1 "October 2012" lackey
+.SH NAME
+lackey \- curses calendar program
+.SH SYNOPSIS
+.B lackey\fR [\fIOPTION\fR..]
+.SH DESCRIPTION
+lackey is a curses calendar program.
+.SH OPTIONS
+.TP
+todo
+.SH CONFIGURATION
+.TP
+todo
+.SH FILES
+.TP
+todo
+.SH SEE ALSO
+.BR date (1),
+.BR cal (1),
+.BR cron (1),
+.BR at (1),
+.BR remind (1),
+.BR calcurse (1)
+.SH BUGS
+Many
+# lackey - curses calendar program
+# See COPYING file for copyright and license details.
+
-include config.mk
# Settings
-CC ?= gcc
-CFLAGS ?= -Wall --std=c99
-CPPFLAGS ?= -Isrc
-LDFLAGS ?= -lncursesw -lical
+VERSION ?= 0.1-rc1
+PREFIX ?= /usr/local
+MANPREFIX ?= $(PREFIX)/share/man
+
+# Compiler
+CC ?= gcc
+CFLAGS ?= -Wall --std=c99
+CPPFLAGS ?= -Isrc
+LDFLAGS ?= -lncursesw -lical
# Sources
-PROG = lackey
-PROG_SRC = main view date cal util
-TEST = test
-TEST_SRC = test date util
-VIEWS = day week month year events todo settings help
-CALS = dummy ical
+PROG ?= lackey
+PROG_SRC ?= main view date cal util
+TEST ?= test
+TEST_SRC ?= test date util
+VIEWS ?= day week month year events todo settings help
+CALS ?= dummy ical
# Targets
-all: $(PROG) $(TEST)
-
-run-$(PROG): $(PROG)
- @urxvt -e ./$<
- @cat /tmp/lackey.log
-
-run-$(TEST): $(TEST)
- ./$<
+all: $(PROG)
clean:
rm -f src/*.o views/*.o cals/*.o $(PROG) $(TEST)
+dist:
+ tar -czf $(PROG)-$(VERSION).tar.gz --transform s::$(PROG)-$(VERSION)/: \
+ README COPYING config.mk.example makefile */*.txt */*.1 */*.c */*.h
+
+install: all
+ install -m 755 -D $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
+ install -m 644 -D doc/$(PROG).1 $(DESTDIR)$(MANPREFIX)/man1/$(PROG).1
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
+ rm -f $(DESTDIR)$(MANPREFIX)/man1/$(PROG).1
+
# Rules
$(PROG): $(PROG_SRC:%=src/%.o) $(VIEWS:%=views/%.o) $(CALS:%=cals/%.o)
$(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
%.o: %.c $(wildcard src/*.h) makefile
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.PHONY: all clean dist install uninstall