* fix as-needed issues * fix parallel build http://bugs.gentoo.org/show_bug.cgi?id=334861 https://gna.org/bugs/index.php?16562 --- config.mk +++ config.mk @@ -22,11 +22,11 @@ LIBS = ${LIB_LIBS} # flags -CFLAGS += -fPIC -std=c99 -DUOFF_T_LONG ${INCS} -LDFLAGS += -shared ${LIBS} +CFLAGS += -fPIC -std=c99 -DUOFF_T_LONG +LDFLAGS += -shared # debug -CFLAGS += -W -ggdb -Wall -Wno-unused-parameter +#CFLAGS += -W -ggdb -Wall -Wno-unused-parameter # compiler and linker CC = cc --- src/rules.mk +++ src/rules.mk @@ -4,25 +4,27 @@ OBJS = ${SRCS:.c=.o} -all: ${LIB} +LIBSO=lib${LIB}.so + +all: ${LIBSO} .c.o: - ${CC} ${CFLAGS} -o $@ -c $< + ${CC} ${CFLAGS} ${INCS} -o $@ -c $< -${LIB}: ${OBJS} - ${CC} ${LDFLAGS} -o lib$@.so ${OBJS} +${LIBSO}: ${OBJS} + ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} clean: - rm -f lib${LIB}.so ${OBJS} + rm -f ${LIBSO} ${OBJS} install: all - @echo installing the module lib${LIB}.so to ${DESTDIR}${IRSSI_LIB}/modules + @echo installing the module ${LIBSO} to ${DESTDIR}${IRSSI_LIB}/modules install -d ${DESTDIR}${IRSSI_LIB}/modules - install lib${LIB}.so ${DESTDIR}${IRSSI_LIB}/modules + install ${LIBSO} ${DESTDIR}${IRSSI_LIB}/modules uninstall: - @echo deinstalling the module lib${LIB}.so from ${DESTDIR}${IRSSI_LIB}/modules - rm -f ${DESTDIR}${IRSSI_LIB}/modules/lib${LIB}.so + @echo deinstalling the module ${LIBSO} from ${DESTDIR}${IRSSI_LIB}/modules + rm -f ${DESTDIR}${IRSSI_LIB}/modules/${LIBSO} user-install: env DESTDIR= IRSSI_LIB=~/.irssi ${MAKE} install