2 # See LICENSE file for copyright and license details.
13 @echo st build options:
14 @echo "CFLAGS = $(STCFLAGS)"
15 @echo "LDFLAGS = $(STLDFLAGS)"
19 cp config.def.h config.h
22 $(CC) $(STCFLAGS) -c $<
24 st.o: config.h st.h win.h
27 $(OBJ): config.h config.mk
30 $(CC) -o $@ $(OBJ) $(STLDFLAGS)
33 rm -f st $(OBJ) st-$(VERSION).tar.gz
36 mkdir -p st-$(VERSION)
37 cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 arg.h $(SRC) st-$(VERSION)
38 tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
42 mkdir -p $(DESTDIR)$(PREFIX)/bin
43 cp -f st $(DESTDIR)$(PREFIX)/bin
44 chmod 755 $(DESTDIR)$(PREFIX)/bin/st
45 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
46 sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
47 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
49 @echo Please see the README file regarding the terminfo entry of st.
52 rm -f $(DESTDIR)$(PREFIX)/bin/st
53 rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
55 .PHONY: all options clean dist install uninstall