Blob


1 include config.mk
3 .SUFFIXES: .o .c
5 BIN = rene
6 OBJ = $(BIN:=.o)
7 SRC = $(BIN:=.c)
8 MAN = $(BIN:=.1)
10 all: $(BIN)
12 $(BIN): $(OBJ)
13 $(CC) -o $@ $(OBJ) $(LDFLAGS)
15 $(OBJ): config.mk
17 .c.o:
18 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
20 install: all
21 mkdir -p $(DESTDIR)$(PREFIX)/bin
22 install -m 755 $(BIN) $(DISTDIR)$(PREFIX)/bin/
23 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
24 install -m 644 $(MAN) $(DISTDIR)$(MANPREFIX)/man1
26 uninstall:
27 cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
28 cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN)
30 dist: clean
31 mkdir -p rene-$(VERSION)
32 cp -rf CHANGES README Makefile config.mk t $(SRC) $(MAN) rene-$(VERSION)
33 tar cf - rene-$(VERSION) | gzip >rene-$(VERSION).tar.gz
34 rm -rf rene-$(VERSION)
36 clean:
37 -rm -f $(BIN) $(OBJ) *.tar.gz *.core
39 test: all
40 sh ./t/t.sh
42 .PHONY: all install uninstall clean dist test