sic/Makefile

59 lines
1.4 KiB
Makefile
Raw Normal View History

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} $<
2017-03-18 21:24:55 +03:00
${OBJ}: config.h config.mk strlcpy.c util.c
2014-11-02 11:23:48 +03:00
config.h:
@echo creating $@ from config.def.h
@cp config.def.h $@
2006-09-26 16:24:26 +04:00
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}
2017-03-18 21:24:55 +03:00
@cp -R LICENSE Makefile README arg.h config.def.h config.mk sic.1 sic.c util.c strlcpy.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
@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