2006-09-26 16:24:26 +04:00
|
|
|
# sic - simple irc client
|
2006-07-17 20:17:31 +04:00
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
|
|
|
SRC = sic.c
|
|
|
|
OBJ = ${SRC:.c=.o}
|
|
|
|
|
|
|
|
all: options sic
|
|
|
|
|
|
|
|
options:
|
2006-09-26 16:24:26 +04:00
|
|
|
@echo sic build options:
|
2006-07-17 20:17:31 +04:00
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo CC $<
|
|
|
|
@${CC} -c ${CFLAGS} $<
|
|
|
|
|
2006-09-26 16:24:26 +04:00
|
|
|
${OBJ}: config.mk
|
|
|
|
|
|
|
|
sic: ${OBJ}
|
2007-02-14 12:05:41 +03:00
|
|
|
@echo CC -o $@
|
|
|
|
@${CC} -o $@ ${OBJ} ${LDFLAGS}
|
2006-09-26 16:24:26 +04:00
|
|
|
|
2006-07-17 20:17:31 +04:00
|
|
|
clean:
|
2006-09-26 16:24:26 +04:00
|
|
|
@echo cleaning
|
|
|
|
@rm -f sic ${OBJ} sic-${VERSION}.tar.gz
|
2006-07-17 20:17:31 +04:00
|
|
|
|
|
|
|
dist: clean
|
2006-09-26 16:24:26 +04:00
|
|
|
@echo creating dist tarball
|
2006-07-17 20:17:31 +04:00
|
|
|
@mkdir -p sic-${VERSION}
|
2010-08-06 12:52:12 +04:00
|
|
|
@cp -R LICENSE Makefile README config.mk sic.1 sic.c util.c sic-${VERSION}
|
2006-07-17 20:17:31 +04:00
|
|
|
@tar -cf sic-${VERSION}.tar sic-${VERSION}
|
|
|
|
@gzip sic-${VERSION}.tar
|
|
|
|
@rm -rf sic-${VERSION}
|
|
|
|
|
|
|
|
install: all
|
2006-09-26 16:24:26 +04:00
|
|
|
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
|
2006-07-17 20:17:31 +04:00
|
|
|
@mkdir -p ${DESTDIR}${PREFIX}/bin
|
2006-09-26 16:24:26 +04:00
|
|
|
@cp -f sic ${DESTDIR}${PREFIX}/bin
|
|
|
|
@chmod 755 ${DESTDIR}${PREFIX}/bin/sic
|
|
|
|
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
2006-07-17 20:17:31 +04:00
|
|
|
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
2007-02-21 13:00:12 +03:00
|
|
|
@sed "s/VERSION/${VERSION}/g" < sic.1 > ${DESTDIR}${MANPREFIX}/man1/sic.1
|
2006-09-26 16:24:26 +04:00
|
|
|
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/sic.1
|
2006-07-17 20:17:31 +04:00
|
|
|
|
|
|
|
uninstall:
|
2006-09-26 16:24:26 +04:00
|
|
|
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
|
|
|
|
@rm -f ${DESTDIR}${PREFIX}/bin/sic
|
|
|
|
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
@rm -f ${DESTDIR}${MANPREFIX}/man1/sic.1
|
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall
|