summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-17 18:17:31 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-17 18:17:31 +0200
commit759063908d19e592f0d3bb3759964cec35114c8c (patch)
treeb9d9c176b7388f9696b9c9c8102daa297ac8c775 /Makefile
downloadcic-759063908d19e592f0d3bb3759964cec35114c8c.tar.gz
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9c11042
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,53 @@
+# ii - irc it - simple but flexible IRC client
+# (C)opyright MMV Anselm R. Garbe, Nico Golde
+
+include config.mk
+
+SRC = sic.c
+OBJ = ${SRC:.c=.o}
+MAN1 = sic.1
+BIN = sic
+
+all: options sic
+ @echo built sic
+
+options:
+ @echo ii build options:
+ @echo "LIBS = ${LIBS}"
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+
+.c.o:
+ @echo CC $<
+ @${CC} -c ${CFLAGS} $<
+
+clean:
+ rm -f sic *.o core sic-${VERSION}.tar.gz
+
+dist: clean
+ @mkdir -p sic-${VERSION}
+ @cp -R Makefile README LICENSE config.mk sic.c sic.1 sic-${VERSION}
+ @tar -cf sic-${VERSION}.tar sic-${VERSION}
+ @gzip sic-${VERSION}.tar
+ @rm -rf sic-${VERSION}
+
+sic: ${OBJ}
+ @echo LD $@
+ @${CC} -o $@ ${OBJ} ${LDFLAGS}
+
+install: all
+ @mkdir -p ${DESTDIR}${PREFIX}/bin
+ @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
+ @echo installed executable files to ${DESTDIR}${PREFIX}/bin
+ @mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
+ @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
+
+uninstall:
+ for i in ${BIN}; do \
+ rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
+ done
+ for i in ${MAN1}; do \
+ rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
+ done