# $USAGI: Makefile,v 1.4 2003/11/18 01:43:56 takamiya Exp $

# Copyright (C)2003 USAGI/WIDE Project
# 
# 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

CFLAGS = $(CCOPTS) $(DEF) $(INC)

NL_OBJS = mip6nl.o
NL_LIB_STFILE = libmip6nl.a

MH_OBJS = mip6mh.o
MH_LIB_STFILE = libmip6mh.a

TUN_OBJS = mip6tunnel.o
TUN_LIB_STFILE = libmip6tunnel.a

OBJS = $(NL_OBJS) $(MH_OBJS)
LIB_STFILE = $(NL_LIB_STFILE) $(MH_LIB_STFILE) $(TUN_LIB_STFILE)

all: $(LIB_STFILE)

$(NL_LIB_STFILE): $(NL_OBJS)
	$(AR) -r $@ $(NL_OBJS)
$(MH_LIB_STFILE): $(MH_OBJS)
	$(AR) -r $@ $(MH_OBJS)
$(TUN_LIB_STFILE): $(TUN_OBJS)
	$(AR) -r $@ $(TUN_OBJS)

clean:
	rm -f $(OBJS) $(LIB_STFILE)

distclean: clean
	rm -f *~

$(NL_OBJS): ../include/mip6nl.h
$(MH_OBJS): ../include/mip6nl.h
$(TUN_OBJS): mip6tunnel.c
