#  Makefile
#
#  LUNAR - Lightweight Underlay Network Ad hoc Routing
#
#  Makefile for building ARM versions of the lunar.o kernel module
#  (kernel 2.4.x)
#
#  Copyright (C) 2001-2003 Christian Tschudin <christian.tschudin@unibas.ch>
#
#  This file is distributed under the terms of the GNU general Public
#  License (GPL), see the file COPYING

KDIR=/usr/src/linux-2.4.18-rmk7-pxa3-embedix

CC=/opt/Embedix/tools/bin/arm-linux-gcc
MFLAGS=-DEXPORT_SYMTAB -DCONFIG_MODVERSIONS
CFLAGS=-Wall -isystem $(KDIR)/include -DNO_IPV6

# ---------------------------------------------------------------------------

all:
	$(MAKE) -f Makefile-arm clean
	$(MAKE) -f Makefile-arm modules


modules:
	@echo // Reading header files from $(KDIR)
	$(MAKE) -f Makefile-arm lunar.o


lunar.o:	./netbox_lnx.c ./sapf_lnx.c \
		../src/xrp.c ../src/lunar_core.c \
		../src/lunar_init.c ../src/lunar_dhcp.c \
		../src/lunar_ipv6.c ../src/lunar_dns.c \
		../include/lunar.h ../include/lunar_decl.h \
		../include/netbox.h ../include/netbox_decl.h \
		../include/platform.h ../include/platform_lnx.h \
		../include/sapf.h ../include/sapf_decl.h \
		../include/xrp.h ../include/xrp_decl.h \
		../include/version.h
	$(CC) $(CFLAGS) $(MFLAGS) -c lunar.c


clean:
	rm -f *.o *~

# eof
