Blame


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