st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

Makefile (1229B)


      1 # st - simple terminal
      2 # See LICENSE file for copyright and license details.
      3 .POSIX:
      4 
      5 include config.mk
      6 
      7 SRC = st.c x.c $(LIGATURES_C) $(SIXEL_C)
      8 OBJ = $(SRC:.c=.o)
      9 
     10 all: st
     11 
     12 config.h:
     13 	cp config.def.h config.h
     14 
     15 patches.h:
     16 	cp patches.def.h patches.h
     17 
     18 .c.o:
     19 	$(CC) $(STCFLAGS) -c $<
     20 
     21 st.o: config.h st.h win.h
     22 x.o: arg.h config.h st.h win.h $(LIGATURES_H)
     23 
     24 $(OBJ): config.h config.mk patches.h
     25 
     26 st: $(OBJ)
     27 	$(CC) -o $@ $(OBJ) $(STLDFLAGS)
     28 
     29 clean:
     30 	rm -f st $(OBJ) st-$(VERSION).tar.gz
     31 
     32 dist: clean
     33 	mkdir -p st-$(VERSION)
     34 	cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
     35 		config.def.h st.info st.1 arg.h st.h win.h $(LIGATURES_H) $(SRC)\
     36 		st-$(VERSION)
     37 	tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
     38 	rm -rf st-$(VERSION)
     39 
     40 install: st
     41 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     42 	cp -f st $(DESTDIR)$(PREFIX)/bin
     43 	chmod 755 $(DESTDIR)$(PREFIX)/bin/st
     44 	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
     45 	sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
     46 	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
     47 	tic -sx st.info
     48 	@echo Please see the README file regarding the terminfo entry of st.
     49 
     50 uninstall:
     51 	rm -f $(DESTDIR)$(PREFIX)/bin/st
     52 	rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
     53 
     54 .PHONY: all clean dist install uninstall