st

my build of st
git clone git://giovanniamaral.com/st
Log | Files | Refs | README | LICENSE

Makefile (1194B)


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