srcdir = .
top_srcdir = ../..
BINDIR = /usr/sbin

pkgincludedir = $(includedir)
USERLIB_DIR = $(STAGING_DIR)/usr/lib
EX_LIBS = -L$(USERLIB_DIR)  -lpthread -lusb-1.0 -lcrypto -lssl
LDFLAGS += -L$(BUILD_DIR)openssl-0.9.8h
INCLUDES = -I$(STAGING_DIR)/usr/include/libusb-1.0
INCLUDES += -I$(BUILD_DIR)/openssl-0.9.8h -I$(BUILD_DIR)/openssl-0.9.8h/include
CFLAGS = $(INCLUDES) $(EX_LIBS) 

OBJS = wimax.c protocol.c tap_dev.c usb_eap.c

default : build.h madwimax

madwimax: $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o madwimax $(OBJS) $(EX_LIBS)

install :
	cp madwimax $(BINDIR)

clean	:
	rm -f *.o madwimax build.h
	
build.h	:  
	echo '#define BUILD "' `date '+%T %F'` '"' >build.h
	
	