sic/Makefile

57 lines
1.3 KiB
Makefile
Raw Normal View History

2006-09-26 16:24:26 +04:00
# sic - simple irc client
# (C)opyright MMVI Anselm R. Garbe
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
@strip $@
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}
2006-09-26 16:24:26 +04:00
@cp -R LICENSE Makefile README config.mk sic.1 ${SRC} 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
@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