se

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

Makefile (1255B)


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