# $USAGI: Makefile,v 1.15 2004/04/24 08:37:12 nakam 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
CC = gcc -g
CCOPTS = -DDEBUG \
	-DCONFIG_XFRM_ENHANCEMENT -DCONFIG_IPV6_MIP6 -DCONFIG_IPV6_MIP6_DEBUG
# kernel header
ifeq ($(KERNEL_INC),)
        KERNEL_INC = /lib/modules/`/bin/uname -r`/build/include
#       KERNEL_INC=$$HOME/usagi/kernel/linux26/include
endif

INC = -I$(KERNEL_INC) -I../include

CFLAGS = $(CCOPTS) $(DEF) $(INC) 
#LDFLAGS = -L/usr/local/v6/lib -linet6
LIBS = ../lib/libmip6nl.a ../lib/libmip6mh.a ../lib/libmip6tunnel.a
OBJS = bc.o bul.o mh.o net.o cn.o ha.o mn.o mip6d.o mip6_xfrm.o ifaddrs.o \
	util.o
TARGET = mip6d

all: $(TARGET)

$(TARGET): $(OBJS) $(LIBS)

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

distclean: clean
	rm -f *~

$(OBJS): ../include/mip6.h glue.h bc.h bul.h mh.h mip6d.h $(LIBS)
