lchat

A line oriented chat front end for ii.
git clone git://git.suckless.org/lchat
Log | Files | Refs | README

Makefile (1280B)


      1 include config.mk
      2 
      3 .PHONY: all install uninstall filter clean test dist
      4 
      5 all: lchat
      6 clean:
      7 	rm -f lchat *.o *.core sl_test filter/indent
      8 
      9 install: lchat
     10 	cp lchat $(DESTDIR)$(BINDIR)
     11 	cp lchat.1 $(DESTDIR)$(MAN1DIR)
     12 
     13 uninstall:
     14 	rm -f $(DESTDIR)$(BINDIR)/lchat $(DESTDIR)$(MAN1DIR)/lchat.1
     15 
     16 test: sl_test
     17 	./sl_test
     18 
     19 dist:
     20 	mkdir -p lchat-$(VERSION)
     21 	cp -r $$(git ls-tree --name-only HEAD) lchat-$(VERSION)
     22 	tar -czf lchat-$(VERSION).tar.gz lchat-$(VERSION)
     23 	rm -fr lchat-$(VERSION)
     24 
     25 lchat: lchat.o slackline.o util.o slackline_emacs.o
     26 	$(CC) -o $@ lchat.o slackline.o slackline_emacs.o util.o $(LIBS)
     27 
     28 lchat.o: lchat.c
     29 	$(CC) -c $(CFLAGS) -D_BSD_SOURCE -D_XOPEN_SOURCE -D_GNU_SOURCE \
     30 	    -o $@ lchat.c
     31 
     32 filter: filter/indent
     33 filter/indent: filter/indent.c util.o util.h
     34 	$(CC) $(CFLAGS) -o $@ filter/indent.c util.o
     35 
     36 sl_test.o: sl_test.c slackline.h
     37 	$(CC) $(CFLAGS) -Wno-sign-compare -c -o $@ sl_test.c
     38 
     39 sl_test: sl_test.o slackline.o slackline_emacs.o slackline.h
     40 	$(CC) $(CFLAGS) -o $@ sl_test.o slackline.o slackline_emacs.o $(LIBS)
     41 
     42 slackline.o: slackline.c slackline.h
     43 	$(CC) -c $(CFLAGS) -o $@ slackline.c
     44 
     45 slackline_emacs.o: slackline_emacs.c slackline.h
     46 	$(CC) -c $(CFLAGS) -o $@ slackline_emacs.c
     47 
     48 util.o: util.c util.h
     49 	$(CC) -c $(CFLAGS) -D_BSD_SOURCE -o $@ util.c