7 SRCS = dict.c print.c radius.c valuepair.c token.c misc.c \
8 log.c filters.c missing.c md4.c md5.c sha1.c \
9 hmac.c hmacsha1.c snprintf.c isaac.c crypt.c \
10 udpfromto.c rbtree.c hash.c
12 INCLUDES = ../include/radius.h ../include/libradius.h \
13 ../include/missing.h ../include/autoconf.h
15 CFLAGS += -D_LIBRADIUS -I../include
17 # if you have problems with things that need SHA1-HMAC, this will
18 # dump the key and the input to the hash so you can compare to what
19 # the other end is doing.
20 CFLAGS += -DHMAC_SHA1_DATA_PROBLEMS
24 TARGET=$(LIBPREFIX)radius
26 STATIC_OBJS = $(SRCS:.c=.o)
27 DYNAMIC_OBJS = $(SRCS:.c=.lo)
29 $(STATIC_OBJS): $(INCLUDES)
30 $(DYNAMIC_OBJS): $(INCLUDES)
32 #######################################################################
36 #######################################################################
38 $(CC) $(CFLAGS) -c $< -o $@
41 $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
44 $(TARGET).a: $(STATIC_OBJS)
45 $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -static -o $@ $^ $(LCRYPT)
47 ifneq ($(USE_SHARED_LIBS),yes)
51 $(TARGET).la: $(DYNAMIC_OBJS)
52 $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
53 $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ $(LCRYPT)
60 rm -f *.o *.lo $(TARGET).a $(TARGET).la
63 install: static dynamic
64 $(LIBTOOL) --mode=install $(INSTALL) -c \
65 $(TARGET).la $(R)$(libdir)/$(TARGET).la;
66 rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
67 ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la