diff options
author | Nick White <git@njw.me.uk> | 2010-05-19 17:15:41 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2010-05-19 17:15:41 +0100 |
commit | e91ec0d87aa31cb465fe8cf934d405ad56342eba (patch) | |
tree | 1709e437c0d8f144bec479975a777c6ae8580eba /Makefile | |
parent | 6cf58b46037cf04915fa507813ab7419db2e45ec (diff) |
Switched to simpler build system, and fixed bugs
Now there's a proper build system in place, which is actually simple
enough to understand.
I also fixed plenty of warnings about the code (reminding me how badly I
knew C when I wrote this).
Hinduism today aren't indexing their new issues using the index file I
was sourcing any more, so I don't expect to fix any more bugs or improve
this much.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9a9847c --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# See COPYING file for copyright, license and warranty details. + +include config.mk + +TARGET = getht +SRC = $(shell find . -name '*.c') +OBJ = $(SRC:.c=.o) +MAN = $(TARGET:=.1) +DOC = README + +all: $(TARGET) + +$(TARGET:=.o): $(SRC) + cc -c $(SRC) $(CFLAGS) + +$(TARGET): $(OBJ) + cc -o $@ $(OBJ) $(LDFLAGS) + +clean: + rm -f -- $(TARGET) $(OBJ) + +install: + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f $(TARGET) $(DESTDIR)$(PREFIX)/bin + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1 + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET) + rm -f $(DESTDIR)$(MANPREFIX)/man1/$(MAN) + +dist: clean + mkdir -p getht-$(VERSION) + cp -R $(SRC) $(DOC) getht-$(VERSION) + sed "s/VERSION/$(VERSION)/g" < $(MAN) > getht-$(VERSION)/$(MAN) + tar -c getht-$(VERSION) > getht-$(VERSION).tar + bzip2 < getht-$(VERSION).tar > getht-$(VERSION).tar.bz2 + rm -rf getht-$(VERSION).tar getht-$(VERSION) + gpg -b < getht-$(VERSION).tar.bz2 > getht-$(VERSION).tar.bz2.sig + sha1sum < getht-$(VERSION).tar.bz2 > getht-$(VERSION).tar.bz2.sha1 |