Blob


1 include config.mk
2 include version.mk
4 .SUFFIXES: .o .c
6 BIN = xitems
7 OBJ = $(BIN:=.o)
8 SRC = $(BIN:=.c)
9 MAN = $(BIN:=.1)
11 all: $(BIN)
13 $(BIN): $(OBJ)
14 $(CC) $(CFLAGS) $(PCCFLAGS) -o $@ $(OBJ) $(LDFLAGS)
16 $(OBJ): config.mk
18 .c.o:
19 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
21 install: all
22 mkdir -p $(DESTDIR)$(PREFIX)/bin
23 install -m 755 $(BIN) $(DESTDIR)$(PREFIX)/bin
24 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
25 install -m 644 $(MAN) $(DESTDIR)$(MANPREFIX)/man1
27 uninstall:
28 cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
29 cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN)
31 clean:
32 -rm -rf $(BIN) $(OBJ) xitems$(V) *.tar.gz *.core
34 dist: clean
35 mkdir xitems$(V)
36 cp $(SRC) $(MAN) README COPYING CHANGES Makefile config.mk version.mk \
37 xitems$(V)
38 tar cf - xitems$(V) | gzip >xitems$(V).tar.gz
39 rm -rf xitems$(V)
41 tags: $(SRC)
42 ctags $(SRC)
44 .PHONY: all install uninstall clean dist