Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 129 lines (89 sloc) 3.424 kb
9f0cff1 Initial commit.
Sound and Fury authored
1 # Makefile for quIRC
2
b7319a8 Asynch name lookups
ec429 authored
3 CC := gcc
4 OPTFLAGS := -g
5 CFLAGS := -Wall -Wextra -Werror -pedantic -std=gnu99 $(OPTFLAGS)
6 AWK := gawk
4a2bd9b Fixed bugs in 'make dist'
Sound and Fury authored
7 VERSION := `git describe --tags`
b7319a8 Asynch name lookups
ec429 authored
8 PREFIX := /usr/local
9 # -lanl is for ASYNCH_NL
10 OPTLIBS := -lanl
28c2ab3 Fixed everything in buffer.c to use the new ttyesc functions
ec429 authored
11 LIBS := -lncurses ttyraw.o ttyesc.o irc.o bits.o colour.o buffer.o names.o config.o input.o $(OPTLIBS)
b7319a8 Asynch name lookups
ec429 authored
12 INCLUDE := ttyraw.h ttyesc.h irc.h bits.h colour.h buffer.h names.h config.h input.h quirc.h version.h osconf.h
9f0cff1 Initial commit.
Sound and Fury authored
13
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
14 all: quirc doc
9f0cff1 Initial commit.
Sound and Fury authored
15
d0f7f76 Man page with pointers to full documentation
ec429 authored
16 install: all doc
7fbe18a Makefile fixes (should fix gitlessing tarballs) & some plans
ec429 authored
17 install -D -m0755 quirc $(PREFIX)/bin/quirc
d0f7f76 Man page with pointers to full documentation
ec429 authored
18 install -D -m0644 quirc.1 $(PREFIX)/man/man1/quirc.1
19 install -D -m0644 readme.htm $(PREFIX)/share/doc/quirc/readme.htm
20 install -D -m0644 config_ref.htm $(PREFIX)/share/doc/quirc/config_ref.htm
21 install -D -m0644 tutorial.htm $(PREFIX)/share/doc/quirc/tutorial.htm
1bf0755 'make install' rule
Sound and Fury authored
22
4050262 Use a post-commit hook to update version.h (with the Makefile)
Sound and Fury authored
23 uninstall:
24 rm $(PREFIX)/bin/quirc
25
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
26 quirc: quirc.c $(LIBS) $(INCLUDE)
de4ae60 config: generate much of the config code from a concise descriptions fil...
ec429 authored
27 $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(LIBS) -lm $(DEFINES)
68d1b71 Use mcheck.h for memory profiling
Sound and Fury authored
28
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
29 quirc.h: config.h version.h
30 touch quirc.h
31
4050262 Use a post-commit hook to update version.h (with the Makefile)
Sound and Fury authored
32 clean:
deaccc7 Makefile: update 'realclean' rule
ec429 authored
33 -rm *.o quirc genconfig genkeymap
4050262 Use a post-commit hook to update version.h (with the Makefile)
Sound and Fury authored
34
35 realclean: clean
deaccc7 Makefile: update 'realclean' rule
ec429 authored
36 -rm c_init.c README version.h config_* keymap.c keymod.h
4050262 Use a post-commit hook to update version.h (with the Makefile)
Sound and Fury authored
37
d0f7f76 Man page with pointers to full documentation
ec429 authored
38 doc: README config_ref.htm quirc.1
6b0feff Canonical readme in HTML format; makerule to generate plain text
Sound and Fury authored
39
40 README: readme.htm
e2c3e47 Fix generation of README (&apos; and &quot;)
ec429 authored
41 -sed -e "s/&apos;/'/g" -e "s/&quot;/\"/g" < readme.htm | html2text -nobs -o README
6b0feff Canonical readme in HTML format; makerule to generate plain text
Sound and Fury authored
42
d0f7f76 Man page with pointers to full documentation
ec429 authored
43 # warning, this explodes if PREFIX contains a !
44 quirc.1: man.in
45 sed -e "s!\$$PREFIX!$(PREFIX)!g" < man.in > quirc.1
46
c408645 Make the Makefile more clever (pattern rules for the object files)
Sound and Fury authored
47 # funky make cleverness to generate object files; a %.o /always/ depends on its %.h as well as its %.c
9f0cff1 Initial commit.
Sound and Fury authored
48
c408645 Make the Makefile more clever (pattern rules for the object files)
Sound and Fury authored
49 %.o: %.c %.h
eb63d03 --debug option, and debugging mode
Sound and Fury authored
50 $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ $(DEFINES)
9f0cff1 Initial commit.
Sound and Fury authored
51
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
52 ttyesc.o: ttyesc.c ttyesc.h bits.h
53
b7319a8 Asynch name lookups
ec429 authored
54 irc.o: irc.c irc.h bits.h buffer.h colour.h names.h numeric.h osconf.h
2b3007c Highlight escape sequences in input line
Sound and Fury authored
55
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
56 irc.h: config.h
57 touch irc.h
9f0cff1 Initial commit.
Sound and Fury authored
58
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
59 bits.o: bits.c bits.h ttyesc.h colour.h
60
61 bits.h: config.h
62 touch bits.h
709dc6b Various improvements eg rc file (.quirc)
Sound and Fury authored
63
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
64 colour.o: colour.c colour.h c_init.c ttyesc.h
15e4136 Automatic version-number generation from git describe
Sound and Fury authored
65
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
66 buffer.o: buffer.c buffer.h ttyesc.h colour.h bits.h names.h text.h irc.h version.h input.h
a886cb2 Moved name-list handling out to new files 'names.*'
Sound and Fury authored
67
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
68 buffer.h: config.h version.h
69 touch buffer.h
de4ae60 config: generate much of the config code from a concise descriptions fil...
ec429 authored
70
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
71 config.o: config.c config.h names.h bits.h colour.h text.h version.h
de4ae60 config: generate much of the config code from a concise descriptions fil...
ec429 authored
72
62617ff Configurable keymapping
ec429 authored
73 config.c: config_check.c config_def.c config_need.c config_rcread.c config_pargs.c config_help.c keymap.c
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
74 touch config.c
75
62617ff Configurable keymapping
ec429 authored
76 config.h: config_globals.h version.h keymod.h
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
77 touch config.h
78
79 config_%: config.cdl genconfig
de4ae60 config: generate much of the config code from a concise descriptions fil...
ec429 authored
80 ./genconfig $@ < config.cdl > $@ || (rm $@ && false)
81
82 genconfig: genconfig.c
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
83
62617ff Configurable keymapping
ec429 authored
84 input.h: keymod.h
85 touch input.h
86
87 input.o: input.c input.h ttyesc.h names.h buffer.h irc.h bits.h config.h
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
88
89 input.c: config_set.c
90 touch input.c
861788e More refactoring (input routines etc.)
Sound and Fury authored
91
e7b2bd5 Fix /ignore -d bug (i_cull() dissects prefixes)
Sound and Fury authored
92 names.o: names.c names.h buffer.h irc.h
5ed2685 /ignore -l: lists ignores
Sound and Fury authored
93
4881617 Moved rc from ~/.quirc to ~/.quirc/rc (cherrypicked from script branch)
ec429 authored
94 script.o: script.c script.h bits.h buffer.h
95
ac506d8 Generate the default colours from an awk script
Sound and Fury authored
96 c_init.c: colour.d c_init.awk
97 $(AWK) -f c_init.awk colour.d > c_init.c
98
62617ff Configurable keymapping
ec429 authored
99 genkeymap: genkeymap.c
100
101 keymod.h: keys genkeymap
102 ./genkeymap h < keys > $@ || (rm $@ && false)
103
104 keymap.c: keys genkeymap
105 ./genkeymap c < keys > $@ || (rm $@ && false)
106
25bf8a0 Makefile fixes (because make behaves unhelpfully)
ec429 authored
107 FORCE:
108 version.h: FORCE
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
109 ./gitversion
110
959f0a2 make dist also makes doc
Sound and Fury authored
111 dist: all doc
4a2bd9b Fixed bugs in 'make dist'
Sound and Fury authored
112 -mkdir quirc_$(VERSION)
113 for p in $$(ls); do cp $$p quirc_$(VERSION)/$$p; done;
66ea5eb Makefile rule to build a source tarball (and do funky things with versio...
Sound and Fury authored
114 -rm quirc_$(VERSION)/*.tar.gz
7fbe18a Makefile fixes (should fix gitlessing tarballs) & some plans
ec429 authored
115 mv quirc_$(VERSION)/distMakefile quirc_$(VERSION)/Makefile
811d1bd Makefile fixes
ec429 authored
116 tar -czf quirc_$(VERSION).tar.gz quirc_$(VERSION)/
062c4d0 dist Makefile rule, creates tarball with binaries
Sound and Fury authored
117 rm -r quirc_$(VERSION)
118
7fbe18a Makefile fixes (should fix gitlessing tarballs) & some plans
ec429 authored
119 dists: c_init.c config.c config.h doc
66ea5eb Makefile rule to build a source tarball (and do funky things with versio...
Sound and Fury authored
120 -mkdir quirc_$(VERSION)_src
121 for p in $$(ls); do cp $$p quirc_$(VERSION)_src/$$p; done;
122 -rm quirc_$(VERSION)_src/*.tar.gz
123 rm quirc_$(VERSION)_src/*.o
124 rm quirc_$(VERSION)_src/quirc
7fbe18a Makefile fixes (should fix gitlessing tarballs) & some plans
ec429 authored
125 mv quirc_$(VERSION)_src/distMakefile quirc_$(VERSION)_src/Makefile
811d1bd Makefile fixes
ec429 authored
126 tar -czf quirc_$(VERSION)_src.tar.gz quirc_$(VERSION)_src/
66ea5eb Makefile rule to build a source tarball (and do funky things with versio...
Sound and Fury authored
127 rm -r quirc_$(VERSION)_src
128
Something went wrong with that request. Please try again.