summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorerdgeist <>2003-02-12 17:48:37 +0000
committererdgeist <>2003-02-12 17:48:37 +0000
commitdea6bf757aa9a875eab35b2b650412e7605f1308 (patch)
tree14ed8374c3a3862529313088375693a7de70d3a7 /Makefile
CVS moved to erdgeist.org
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile85
1 files changed, 85 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..9f47d28
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,85 @@
1#
2# vchat-client - alpha version
3#
4
5##############################################
6# configuration #
7##############################################
8
9CFLAGS = -Wall -Os #-g -ggdb
10
11## use this line when you've got an readline before 4.(x|2)
12#CFLAGS += -DOLDREADLINE
13
14## you might need one or more of these:
15#CFLAGS += -I/usr/local/ssl/include -L/usr/local/ssl/lib
16#CFLAGS += -I/usr/local/include -L/usr/local/lib
17#CFLAGS += -I/usr/pkg/include -L/usr/pkg/lib
18
19## enable dietlibc
20#CC = diet cc
21#CFLAGS += -static
22
23## enable debug code
24#CFLAGS += -DDEBUG
25
26## the install prefix best is /usr/local
27PREFIX=/usr/local
28
29LIBS = -lncurses -lreadline -lssl -lcrypto
30OBJS = vchat-client.o vchat-ui.o vchat-protocol.o vchat-user.o vchat-commands.o
31
32
33##############################################
34# general targets #
35##############################################
36
37
38all: vchat-client #vchat-client.1
39
40install: vchat-client vchat-keygen vchatrc.ex
41 install -d $(DESTDIR)/etc
42 install -d $(DESTDIR)$(PREFIX)/bin
43 install -d $(DESTDIR)$(PREFIX)/share/man/man1
44 install -m 0755 ./vchat-client $(DESTDIR)$(PREFIX)/bin
45 install -m 0755 ./vchat-keygen $(DESTDIR)$(PREFIX)/bin
46 install -m 0644 ./vchat-client.1 $(DESTDIR)$(PREFIX)/share/man/man1
47 install -m 0644 ./vchatrc.ex $(DESTDIR)/etc/vchatrc
48
49
50uninstall:
51 rm -f $(DESTDIR)$(PREFIX)/bin/vchat-client
52 rm -f $(DESTDIR)$(PREFIX)/bin/vchat-keygen
53 rm -f $(DESTDIR)$(PREFIX)/share/man/man1/vchat-client.1
54 rm -f $(DESTDIR)/etc/vchatrc
55
56
57clean:
58 rm -f .\#* debian/*~ *~ .*~ *.o vchat-client core *.strace \
59 *.ltrace vchat.err vchat.debug* vchat-client.1 manpage.*
60
61
62##############################################
63# compile targets #
64##############################################
65
66vchat-client: $(OBJS)
67 $(CC) $(CFLAGS) -o vchat-client $(OBJS) $(LIBS)
68
69vchat-client.o: vchat-client.c vchat-config.h Makefile
70 $(CC) $(CFLAGS) -o vchat-client.o -c vchat-client.c
71
72vchat-ui.o: vchat-ui.c vchat.h
73 $(CC) $(CFLAGS) -o vchat-ui.o -c vchat-ui.c
74
75vchat-protocol.o: vchat-protocol.c vchat-messages.h vchat.h Makefile
76 $(CC) $(CFLAGS) -o vchat-protocol.o -c vchat-protocol.c
77
78vchat-user.o: vchat-user.c vchat.h
79 $(CC) $(CFLAGS) -o vchat-user.o -c vchat-user.c
80
81vchat-commands.o: vchat-commands.c vchat.h vchat-config.h
82 $(CC) $(CFLAGS) -o vchat-commands.o -c vchat-commands.c
83
84#vchat-client.1: vchat-client.sgml
85# docbook2man vchat-client.sgml