# st - simple terminal # See LICENSE file for copyright and license details. .POSIX: include config.mk SRC = st.c x.c boxdraw.c hb.c OBJ = $(SRC:.c=.o) all: options st options: @echo st build options: @echo "CFLAGS = $(STCFLAGS)" @echo "LDFLAGS = $(STLDFLAGS)" @echo "CC = $(CC)" .c.o: $(CC) $(STCFLAGS) -c $< st.o: options.h st.h win.h x.o: arg.h options.h st.h win.h hb.h hb.o: st.h boxdraw.o: options.h st.h boxdraw_data.h $(OBJ): options.h config.mk st: $(OBJ) $(CC) -o $@ $(OBJ) $(STLDFLAGS) clean: rm -f st $(OBJ) st-spde-$(VERSION).tar.gz dist: clean mkdir -p st-spde-$(VERSION) cp -R LICENSE Makefile *.mk *.info *.h *.png *.desktop *.ttf $(SRC)\ st-spde-$(VERSION) tar -cf - st-spde-$(VERSION) | gzip > st-spde-$(VERSION).tar.gz rm -rf st-spde-$(VERSION) install: st mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f st $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/st tic -sx st.info @echo Please see the README file regarding the terminfo entry of st. mkdir -p $(DESTDIR)$(ICONPREFIX) [ -f $(ICONNAME) ] && cp -f $(ICONNAME) $(DESTDIR)$(ICONPREFIX) || : mkdir -p $(DESTDIR)$(APPPREFIX) cp -f st.desktop $(DESTDIR)$(APPPREFIX) rm -f ./st rm -f *.o uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/st rm -f $(DESTDIR)$(APPPREFIX)/st.desktop rm -f $(DESTDIR)$(ICONPREFIX)/$(ICONNAME) enablefont: fontctrl install font.ttf fontctrl enable font.ttf help: @echo "install: Install st" @echo "uninstall: Uninstall st" @echo "dist: Package st into st-spde-$(VERSION).tar.gz (Used for Gentoo overlays and the AUR for example)." @echo "clean: Remove .o files and st binary" @echo "help: Display this list" @echo "enablefont: Install and enable the included font.ttf. You must have fontctrl installed for this to be used. If you do not, install it here: https://codeberg.org/speedie/fontctrl" .PHONY: all options clean dist install uninstall help enablefont