$NetBSD: patch-aa,v 1.6 2009/10/07 15:34:14 joerg Exp $ --- Makefile.orig Sat Jun 9 14:37:36 2001 +++ Makefile @@ -1,13 +1,9 @@ # Change paths if necessary -CC = gcc -OPT = -m486 -O2 #OPT = -mpentium -O6 #OPT = -mcpu=k6 -march=k6 -O6 -CONF= -DNO_WIN_DECORATIONS -CFLAGS = $(OPT) -Wall -fPIC `gtk-config --cflags gthread` -LFLAGS = -shared -fPIC -L/usr/local/lib -OBJ = dflowers.o +CFLAGS+= $(OPT) -Wall -fPIC `gtk-config --cflags gthread` +OBJ = dflowers.lo INSTALL-DIR=`xmms-config --visualization-plugin-dir` XMMS_DATADIR=`xmms-config --data-dir` #INSTALL-DIR=$(HOME)/.xmms/Plugins @@ -15,21 +11,26 @@ XMMS_DATADIR=`xmms-config --data-dir` THEME_SUBDIR=dflowers_themes XMMS_DATADIR_FLAGS=-DTHEMEDIR=\"$(XMMS_DATADIR)/$(THEME_SUBDIR)/\" -all: libdflowers.so +.SUFFIXES: .c .lo -libdflowers.so: $(OBJ) - $(CC) -o libdflowers.so $(OBJ) $(LFLAGS) +all: libdflowers.la + +libdflowers.la: $(OBJ) + ${LIBTOOL} --mode=link $(CC) -o libdflowers.la -module -avoid-version $(OBJ) $(LFLAGS) -rpath ${INSTALL-DIR} + +.c.lo: + ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) $(CONF) $(XMMS_DATADIR_FLAGS) -c $< -.c.o: - $(CC) $(CFLAGS) $(XMMS_DATADIR_FLAGS) -c $< clean: - rm -f *.o core *.so* + rm -f *.o core *.so* *.la *.so *.lo + rm -fr .libs distclean: rm -f *.o core *~ -install: - install libdflowers.so $(INSTALL-DIR) +install: libdflowers.la + ${LIBTOOL} --mode=install install libdflowers.la ${DESTDIR}$(INSTALL-DIR) - mkdir -p $(XMMS_DATADIR)/$(THEME_SUBDIR) + mkdir -p ${DESTDIR}$(XMMS_DATADIR)/$(THEME_SUBDIR) - install bg_*.xpm $(XMMS_DATADIR)/$(THEME_SUBDIR) + $(BSD_INSTALL_DATA) bg_*.xpm ${DESTDIR}$(XMMS_DATADIR)/$(THEME_SUBDIR) +