#
# Copyright (c) Nokia 2002. All Rights Reserved. 
#
# Nokia is a registered trademark of Nokia Corporation.
# Other product and company names mentioned herein may be
# trademarks or tradenames of their respective owners. 

KERNEL_SRC = /usr/src/linux-2.6.3-15mdk

INCDIRS  = -I../include -I.

CFLAGS = -Wstrict-prototypes -fomit-frame-pointer -pipe -DKBUILD_MODNAME="nokia_cs"
#-Wno-cast-qual -Wno-strict-prototypes
all: modules

obj-m := nokia_cs.o 

objs = dllc.o dmodule.o dtools.o dserial.o

srcs = dllc.c dmodule.c dtools.c dserial.c
hdrs = $(wildcard *.h)

$(srcs) : $(hdrs)
	
nokia_cs-y := dhw.o dmgr.o slip.o
nokia_cs-y += $(objs)
#nokia_cs-objs := dhw.o dmgr.o slip.o
#nokia_cs-objs += $(objs)

modules:
	$(MAKE) -C $(KERNEL_SRC) SUBDIRS=$(PWD) modules

clean: 
	rm -f core *.o *.ko *~

# Locations ##############################################


#ALL_O := $(objs) $(L_TARGET)

# Targets ################################################


#$(objs) : $(srcs)
#	$(CC) $(REALOPTS) -c $(patsubst %.o, %.c, $@)
#	chmod -x $@

#nokia_cs.o : $(objs) $(L_TARGET)
#	$(LD) -r -o $@ $(ALL_O)
#	chmod -x $@

