Makefile 1.21 KB
Newer Older
stettberger's avatar
stettberger committed
1
CC=gcc
stettberger's avatar
stettberger committed
2 3
prefix=/usr/local
DESTDIR=
stettberger's avatar
stettberger committed
4
TARGET=si
5

stettberger's avatar
stettberger committed
6
FILES=si.c mit.c mm.c buddylist.c
stettberger's avatar
stettberger committed
7

8 9 10
include config.mk

all: options si
stettberger's avatar
stettberger committed
11

12 13 14 15 16 17 18 19 20
options:
	@echo si build options:
	@echo "LIBS     = ${LIBS}"
	@echo "INCLUDES = ${INCLUDES}"
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"

si: si.o 
21
	${CC} si.o -o si ${LDFLAGS}
22 23

si.o: ${FILES}
24
	${CC} -c ${CFLAGS} ${TARGET}.c
stettberger's avatar
stettberger committed
25 26
clean:
	rm -f ${TARGET} *~ *.o *core 
stettberger's avatar
stettberger committed
27
install: all
28 29 30 31 32
	@mkdir -p ${DESTDIR}${DOCDIR}
	@mkdir -p ${DESTDIR}${BINDIR}
	@mkdir -p ${DESTDIR}${MAN1DIR}

	@install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MAN1DIR}
33
	@install -m 644 COPYING README FAQ contrib/buddylist ${DESTDIR}${DOCDIR}
34 35 36 37 38 39 40 41 42 43 44
	@install -m 775 si ${DESTDIR}${BINDIR}
	@install -m 444 si.1 ${DESTDIR}${MAN1DIR}
	@echo "installed si"

uninstall: 
	@rm -f ${DESTDIR}${MAN1DIR}/si.1
	@rm -rf ${DESTDIR}${DOCDIR}
	@rm -f ${DESTDIR}${BINDIR}/si
	@echo "uninstalled si"

dist: clean
stettberger's avatar
stettberger committed
45 46 47
	@mkdir -p si-${VERSION}/contrib
	@cp -R Makefile README COPYING FAQ config.mk si.c si.1 buddylist.c mit.c mm.c si-${VERSION}
	@cp -R contrib/buddylist contrib/multitailrc si-${VERSION}/contrib
48 49 50 51
	@tar -cf si-${VERSION}.tar si-${VERSION}
	@gzip si-${VERSION}.tar
	@rm -rf si-${VERSION}
	@echo created distribution si-${VERSION}.tar.gz