| 1 | include ../../config.mk |
| 2 | |
| 3 | OBJS = ${SRCS:.c=.o} |
| 4 | |
| 5 | LIBSO=lib${LIB}.so |
| 6 | |
| 7 | all: ${LIBSO} |
| 8 | |
| 9 | .c.o: |
| 10 | ${CC} ${CPPFLAGS} ${CFLAGS} ${INCS} -o $@ -c $< |
| 11 | |
| 12 | ${LIBSO}: ${OBJS} |
| 13 | ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} |
| 14 | |
| 15 | clean: |
| 16 | rm -f ${LIBSO} ${OBJS} |
| 17 | |
| 18 | install: all |
| 19 | @echo installing the module ${LIBSO} to ${DESTDIR}${IRSSI_LIB}/modules |
| 20 | install -d ${DESTDIR}${IRSSI_LIB}/modules |
| 21 | install ${LIBSO} ${DESTDIR}${IRSSI_LIB}/modules |
| 22 | |
| 23 | uninstall: |
| 24 | @echo deinstalling the module ${LIBSO} from ${DESTDIR}${IRSSI_LIB}/modules |
| 25 | rm -f ${DESTDIR}${IRSSI_LIB}/modules/${LIBSO} |
| 26 | |
| 27 | user-install: |
| 28 | env DESTDIR= IRSSI_LIB=~/.irssi ${MAKE} install |
| 29 | |
| 30 | user-uninstall: |
| 31 | env DESTDIR= IRSSI_LIB=~/.irssi ${MAKE} uninstall |
| 32 | |
| 33 | .PHONY: clean install uninstall user-install user-uninstall |