##   This file is part of PeerHood.
##
##   PeerHood is free software: you can redistribute it and/or modify
##   it under the terms of the GNU Lesser General Public License 
##   version 2 as published by the Free Software Foundation.
##
##   PeerHood 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 Lesser General Public License for more details.
##
##   You should have received a copy of the GNU Lesser General Public
##   License along with PeerHood. If not, see <http://www.gnu.org/licenses/>.
##

## plugin-listener-wlan/ Makefile
## * so library version numbers are forgotten at this phase as peerhood
##   does not have a version yet

## 1. common defines
include ../MakeCommonDefs.mk

## 2. own defines
MODULE = plugin-listener-wlan
MODULEDIR = $(BUILDDIR)/$(MODULE)
SRCS = $(wildcard *.cc)

OBJS = $(addprefix $(MODULEDIR)/, $(SRCS:%.cc=%.o))
# public includes
INCS = $(wildcard *.h)
PINCS = $(addprefix $(resultincludedir)/,$(INCS))
LDFLAGS = $(PTHREAD.lib)
libname = libpeerhood-listener-wlan-plugin.so
LIBRARY = $(resultlibdir)/$(libname) 


## 3. common rules
include ../MakeCommonRules.mk

## 4. own rules
build-pre:: $(PINCS) 

build-do:: $(LIBRARY)

clean-do::
	rm -f $(OBJS) $(PINCS) $(LIBRARY)

$(LIBRARY): $(OBJS)
	$(MKDIR) $(dir $@)
	$(CXX) $(LDFLAGS) -shared -Wl,-soname,$(libname) -o $@ $(OBJS)


