987e8cbe18
Old build can be found in the previous-2 branch. This one has sixel support among other things, not to mention it draws text properly.
60 lines
1.3 KiB
Makefile
60 lines
1.3 KiB
Makefile
# st - simple terminal
|
|
# See LICENSE file for copyright and license details.
|
|
.POSIX:
|
|
|
|
include options.mk
|
|
|
|
SRC = st.c x.c sixel.c sixelhls.c hb.c bd.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
|
|
boxdraw.o: options.h st.h bd.h
|
|
hb.o: st.h
|
|
|
|
$(OBJ): options.mk
|
|
|
|
st: $(OBJ)
|
|
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
|
|
|
|
clean:
|
|
rm -f st $(OBJ) st-$(VERSION).tar.gz
|
|
|
|
dist: clean
|
|
mkdir -p st-$(VERSION)
|
|
cp -R LICENSE Makefile *.mk \
|
|
*.h *.info *.h *.c *.desktop *.png docs/ scripts/ \
|
|
st-$(VERSION)
|
|
tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
|
|
rm -rf st-$(VERSION)
|
|
|
|
install: st
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
cp -f st $(DESTDIR)$(PREFIX)/bin
|
|
cp -f scripts/* $(DESTDIR)$(PREFIX)/bin
|
|
chmod +x $(DESTDIR)$(PREFIX)/bin/st*
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/st
|
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
|
mkdir -p $(DESTDIR)$(APPPREFIX)
|
|
cp -f st.desktop $(DESTDIR)$(APPPREFIX)
|
|
rm -f *.o st
|
|
tic -sx st.info
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/st
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/st.desktop
|
|
rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
|
|
|
|
.PHONY: all options clean dist install uninstall
|