# -- updatedd: Makefile.in --
#
# Copyright (C) 2002, 2003, 2004 Philipp Benner
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

include plugins.make

prefix		= /usr/local
exec_prefix	= ${prefix}
sbindir		= ${exec_prefix}/sbin
libdir		= ${exec_prefix}/lib

INSTALL		= /usr/bin/install -c
CC		= mips-uclibc-gcc
STRIP           = mips-uclibc-strip
CFLAGS		= -I../../include -Wall -Wwrite-strings -O2  -fPIC
LIBS		= -lresolv -ldl 

UPDATEDDLIBS	= -lresolv -ldl 
OBJECTS		= $(LIB_FILES) error.o

all: plugins

plugins: $(OBJECTS)
	for i in $(LIB_FILES);	do	\
		$(CC) $(CFLAGS) -lresolv -ldl  -Wl,-soname,`basename $$i .o`.so	\
		-shared $$i error.o -o `basename $$i .o`.so;		\
	done

install:
	$(INSTALL) -d $(libdir)/updatedd
	$(INSTALL) -m 755 *.so $(libdir)/updatedd

uninstall:
	rm -rf $(libdir)/updatedd

clean:
	rm -f *.o
	rm -f *.so

proper: clean
	rm -f Makefile
