blob: 9a9847cf8e5a96177bae2f6e042d1f45a780189e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|