mouse shortcuts: allow same functions as kb shortcuts
[st.git] / Makefile
blob470ac86407bbd2876e3ee997e04e57649b51da9f
1 # st - simple terminal
2 # See LICENSE file for copyright and license details.
3 .POSIX:
5 include config.mk
7 SRC = st.c x.c
8 OBJ = $(SRC:.c=.o)
10 all: options st
12 options:
13 @echo st build options:
14 @echo "CFLAGS = $(STCFLAGS)"
15 @echo "LDFLAGS = $(STLDFLAGS)"
16 @echo "CC = $(CC)"
18 config.h:
19 cp config.def.h config.h
21 .c.o:
22 $(CC) $(STCFLAGS) -c $<
24 st.o: config.h st.h win.h
25 x.o: arg.h config.h st.h win.h
27 $(OBJ): config.h config.mk
29 st: $(OBJ)
30 $(CC) -o $@ $(OBJ) $(STLDFLAGS)
32 clean:
33 rm -f st $(OBJ) st-$(VERSION).tar.gz
35 dist: clean
36 mkdir -p st-$(VERSION)
37 cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
38 config.def.h st.info st.1 arg.h st.h win.h $(SRC)\
39 st-$(VERSION)
40 tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
41 rm -rf st-$(VERSION)
43 install: st
44 mkdir -p $(DESTDIR)$(PREFIX)/bin
45 cp -f st $(DESTDIR)$(PREFIX)/bin
46 chmod 755 $(DESTDIR)$(PREFIX)/bin/st
47 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
48 sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
49 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
50 tic -sx st.info
51 @echo Please see the README file regarding the terminfo entry of st.
53 uninstall:
54 rm -f $(DESTDIR)$(PREFIX)/bin/st
55 rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
57 .PHONY: all options clean dist install uninstall