################################################################################
 # Ralink Tech Inc.                                                           #
 # 4F, No. 2 Technology 5th Rd.                                               # 
 # Science-based Industrial Park                                              #
 # Hsin-chu, Taiwan, R.O.C.                                                   #
 #                                                                            #
 # (c) Copyright 2002-2005, Ralink Technology, Inc.                           #
 #                                                                            #
 # 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 := cc

include ./config.mk

WFLAGS := -DAGGREGATION_SUPPORT -DWMM_SUPPORT -Wall -Wstrict-prototypes -Wno-trigraphs  #-DDBG -DSINGLE_ADHOC_LINKUP -DRALINK_ATE
CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)

OBJ = rt61.o

all: $(OBJ)
	@touch config.mk

rt61.o:   rtmp_main.o	\
          mlme.o	\
          connect.o	\
          sync.o	\
          assoc.o	\
          auth.o	\
          auth_rsp.o	\
          rtmp_data.o	\
          rtmp_init.o	\
          sanity.o	\
          rtmp_wep.o	\
          rtmp_info.o	\
          eeprom.o	\
          rtmp_tkip.o	\
          wpa.o		\
          md5.o
          
	$(LD) -r $^ -o $@
		
clean:
	rm -f *.o *~ core

config:
	@touch config.mk
	@./Configure
