#
# $Id$
#

TARGET      = @targetname@
SRCS        = rlm_ippool.c
HEADERS     =
RLM_UTILS   = $(addsuffix $(EXEEXT),@ippool_utils@)
RLM_CFLAGS  = @ippool_cflags@
RLM_LIBS    = @ippool_ldflags@
RLM_INSTALL = @ippool_install@

include ../rules.mak

$(LT_OBJS): $(HEADERS)

rlm_ippool_tool$(EXEEXT): rlm_ippool_tool.lo $(LIBRADIUS)
	$(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(RLM_LDFLAGS) \
		-o $@ $^ $(RLM_LIBS) $(LIBS)

# Install binary files into the bin directory
rlm_ippool_install: rlm_ippool_tool rlm_ippool_tool.8
	$(INSTALL) -m 644 rlm_ippool_tool.8 $(R)$(mandir)/man8
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \
		rlm_ippool_tool$(EXEEXT) $(R)$(bindir)
