From dea6bf757aa9a875eab35b2b650412e7605f1308 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 12 Feb 2003 17:48:37 +0000 Subject: CVS moved to erdgeist.org --- Makefile | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..9f47d28 --- /dev/null +++ b/Makefile @@ -0,0 +1,85 @@ +# +# vchat-client - alpha version +# + +############################################## +# configuration # +############################################## + +CFLAGS = -Wall -Os #-g -ggdb + +## use this line when you've got an readline before 4.(x|2) +#CFLAGS += -DOLDREADLINE + +## you might need one or more of these: +#CFLAGS += -I/usr/local/ssl/include -L/usr/local/ssl/lib +#CFLAGS += -I/usr/local/include -L/usr/local/lib +#CFLAGS += -I/usr/pkg/include -L/usr/pkg/lib + +## enable dietlibc +#CC = diet cc +#CFLAGS += -static + +## enable debug code +#CFLAGS += -DDEBUG + +## the install prefix best is /usr/local +PREFIX=/usr/local + +LIBS = -lncurses -lreadline -lssl -lcrypto +OBJS = vchat-client.o vchat-ui.o vchat-protocol.o vchat-user.o vchat-commands.o + + +############################################## +# general targets # +############################################## + + +all: vchat-client #vchat-client.1 + +install: vchat-client vchat-keygen vchatrc.ex + install -d $(DESTDIR)/etc + install -d $(DESTDIR)$(PREFIX)/bin + install -d $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 0755 ./vchat-client $(DESTDIR)$(PREFIX)/bin + install -m 0755 ./vchat-keygen $(DESTDIR)$(PREFIX)/bin + install -m 0644 ./vchat-client.1 $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 0644 ./vchatrc.ex $(DESTDIR)/etc/vchatrc + + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/vchat-client + rm -f $(DESTDIR)$(PREFIX)/bin/vchat-keygen + rm -f $(DESTDIR)$(PREFIX)/share/man/man1/vchat-client.1 + rm -f $(DESTDIR)/etc/vchatrc + + +clean: + rm -f .\#* debian/*~ *~ .*~ *.o vchat-client core *.strace \ + *.ltrace vchat.err vchat.debug* vchat-client.1 manpage.* + + +############################################## +# compile targets # +############################################## + +vchat-client: $(OBJS) + $(CC) $(CFLAGS) -o vchat-client $(OBJS) $(LIBS) + +vchat-client.o: vchat-client.c vchat-config.h Makefile + $(CC) $(CFLAGS) -o vchat-client.o -c vchat-client.c + +vchat-ui.o: vchat-ui.c vchat.h + $(CC) $(CFLAGS) -o vchat-ui.o -c vchat-ui.c + +vchat-protocol.o: vchat-protocol.c vchat-messages.h vchat.h Makefile + $(CC) $(CFLAGS) -o vchat-protocol.o -c vchat-protocol.c + +vchat-user.o: vchat-user.c vchat.h + $(CC) $(CFLAGS) -o vchat-user.o -c vchat-user.c + +vchat-commands.o: vchat-commands.c vchat.h vchat-config.h + $(CC) $(CFLAGS) -o vchat-commands.o -c vchat-commands.c + +#vchat-client.1: vchat-client.sgml +# docbook2man vchat-client.sgml -- cgit v1.2.3