#
# $Id$
#

TARGET      = @targetname@
SRCS        = rlm_dbm.c
HEADERS     =
RLM_UTILS   = @dbm_utils@
RLM_CFLAGS  = @dbm_cflags@
RLM_LIBS    = @dbm_ldflags@
RLM_INSTALL = @dbm_install@

include ../rules.mak

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

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

#
#  Install the utility programs in the bin directory.
#
rlm_dbm_install: rlm_dbm_cat rlm_dbm_parser
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \
		rlm_dbm_cat$(EXEEXT) $(R)$(bindir)
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \
		rlm_dbm_parser$(EXEEXT) $(R)$(bindir)
