Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

75 lines (49 sloc) 1.826 kb
# Makefile for quIRC
CC ?= gcc
CFLAGS ?= -Wall
AWK ?= gawk
VERSION := `git describe --tags`
PREFIX ?= /usr/local
LIBS := ttyraw.o ttyesc.o irc.o bits.o colour.o buffer.o names.o config.o input.o -lm
INCLUDE := ttyraw.h ttyesc.h irc.h bits.h colour.h buffer.h names.h config.h input.h version.h
all: quirc
install: all
install -D quirc $(PREFIX)/bin/quirc
rm $(PREFIX)/bin/quirc
quirc: quirc.c $(LIBS) $(INCLUDE)
$(CC) $(CFLAGS) $(CPPFLAGS) -o quirc quirc.c $(LIBS) $(DEFINES)
mtrace: quirc-mtrace
quirc-mtrace: quirc.c $(LIBS) $(INCLUDE)
$(CC) $(CFLAGS) $(CPPFLAGS) -o quirc-mtrace quirc.c $(LIBS) -g -DUSE_MTRACE $(DEFINES)
rm *.o quirc
realclean: clean
rm c_init.c README version.h
README: readme.htm
html2text -nobs -o README < readme.htm
# funky make cleverness to generate object files; a %.o /always/ depends on its %.h as well as its %.c
%.o: %.c %.h
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ $(DEFINES)
ttyesc.o: bits.h
irc.o: irc.c irc.h bits.h buffer.h colour.h config.h names.h numeric.h
bits.o: bits.c bits.h ttyesc.h colour.h config.h
colour.o: colour.c colour.h c_init.c ttyesc.h
buffer.o: buffer.c buffer.h ttyesc.h colour.h bits.h names.h text.h irc.h config.h version.h input.h
config.o: config.c config.h names.h bits.h colour.h text.h version.h
input.o: input.c input.h ttyesc.h names.h buffer.h irc.h bits.h
names.o: names.c names.h buffer.h irc.h
c_init.c: colour.d c_init.awk
$(AWK) -f c_init.awk colour.d > c_init.c
# version is touched by a git-commit hook
version.h: version
dist: all doc
-mkdir quirc_$(VERSION)
for p in $$(ls); do cp $$p quirc_$(VERSION)/$$p; done;
rm quirc_$(VERSION)/*.tar.gz
tar -cvvf quirc_$(VERSION).tar quirc_$(VERSION)/
gzip quirc_$(VERSION).tar
rm -r quirc_$(VERSION)
Jump to Line
Something went wrong with that request. Please try again.