GCC	= gcc
AR	= ar
RANLIB  = ranlib
CFLAGS  = -Wall -O2 -I.
LDFLAGS = -shared
TARGET  = libwnet.a
PREFIX  = /usr/local
OBJS    = build_80211.o\
          build_ctrl.o\
          build_data.o\
          build_mgmt.o\
          build_mgmt_fields.o\
          inject.o

all: libwnet

libwnet: $(OBJS)
	$(AR) -cr $(TARGET) $(OBJS)
	$(RANLIB) $(TARGET)

install:
	install -m 644 -o root -g wheel $(TARGET) $(PREFIX)/lib
	install -m 644 -o root -g wheel libwnet.h $(PREFIX)/include
	install -d -m 755 -o root -g wheel $(PREFIX)/include/libwnet
	install -m 644 -o root -g wheel libwnet/libwnet-structures.h $(PREFIX)/include/libwnet

clean:
	rm -f *.o $(TARGET)
