hirc

[archived] IRC client
git clone https://hhvn.uk/hirc
git clone git://hhvn.uk/hirc
Log | Files | Refs

Makefile (1334B)


      1 # misc/Makefile from hirc
      2 #
      3 # Copyright (c) 2021-2022 hhvn <dev@hhvn.uk>
      4 #
      5 # Permission to use, copy, modify, and distribute this software for any
      6 # purpose with or without fee is hereby granted, provided that the above
      7 # copyright notice and this permission notice appear in all copies.
      8 #
      9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     16 
     17 PREFIX	= /usr/local
     18 BINDIR	= $(PREFIX)/bin
     19 MANDIR	= $(PREFIX)/share/man
     20 BINS	= irccat hirc2txt
     21 MANS	= irccat.1 hirc2txt.1
     22 
     23 include ../config.mk
     24 
     25 all: $(BINS)
     26 
     27 install:
     28 	mkdir -p $(BINDIR) $(MANDIR)/man1
     29 	install -m0755 $(BINS) $(BINDIR)/
     30 	for f in $(MANS); do \
     31 		sed 's/COMMIT/$(COMMIT)/' \
     32 			< $$f \
     33 			> $(MANDIR)/man1/$$f; \
     34 	done
     35 
     36 uninstall:
     37 	for f in $(BINS); do \
     38 		rm -f $(BINDIR)/$$f; \
     39 	done
     40 	for f in $(MANS); do \
     41 		rm -f $(MANDIR)/man1/$$f; \
     42 	done
     43 
     44 clean:
     45 	rm -f $(BINS)
     46 
     47 .c:
     48 	cc -o $(<:.c=) $<
     49 
     50 .PHONY: install uninstall clean