# Edit this path to match with your system (it should point to the root
# directory of the Linux kernel source). hostapd uses it only to get matching
# version of linux/wireless.h so that ioctls match with the kernel driver.
ifndef COMPILING_WHOLE_TREE
TOPDIR:=$(shell pwd)
TOPDIR:=$(shell dirname $(TOPDIR))
TOPDIR:=$(shell dirname $(TOPDIR))
include $(TOPDIR)/Rules.make
endif

KERNEL_PATH:=$(LINUXDIR)
#CC=mips-uclibc-softfp-gcc
#STRIP=mips-uclibc-softfp-strip

ifndef CFLAGS
#CFLAGS = -O2 -Wall -I$(KERNEL_PATH)/include
CFLAGS= -O2 -Wall -I.
endif

all: prism2_srec hostap_crypt_conf hostap_diag fake_essid
	$(STRIP) hostap_crypt_conf

prism2_srec: prism2_srec.o util.o

prism2_srec.o: prism2_srec.c util.h

hostap_crypt_conf: hostap_crypt_conf.c
        
hostap_diag: hostap_diag.o util.o
	$(CC) -o hostap_diag $(CFLAGS) hostap_diag.o util.o

hostap_diag.o: hostap_diag.c util.h

util.o: util.c util.h

fake_essid : fake_essid.c

clean:
	rm -f prism2_srec hostap_crypt_conf hostap_diag *.o

