Make hash table have comparison callback, it's needed.
[freeradius.git] / src / lib / Makefile
1 #
2 # Makefile
3 #
4 # Version:      $Id$
5 #
6
7 include ../../Make.inc
8
9 SRCS            = dict.c filters.c hash.c hmac.c hmacsha1.c isaac.c log.c \
10                   misc.c missing.c md4.c md5.c print.c radius.c rbtree.c \
11                   sha1.c snprintf.c strlcat.c strlcpy.c token.c udpfromto.c \
12                   valuepair.c fifo.c packet.c
13
14 LT_OBJS         = $(SRCS:.c=.lo)
15
16 INCLUDES        = ../include/radius.h ../include/libradius.h \
17                   ../include/missing.h ../include/autoconf.h
18
19 CFLAGS          += -D_LIBRADIUS -I$(top_builddir)/src
20
21 # if you have problems with things that need SHA1-HMAC, this will
22 # dump the key and the input to the hash so you can compare to what
23 # the other end is doing.
24 #CFLAGS += -DHMAC_SHA1_DATA_PROBLEMS
25
26 ifeq ($(USE_SHARED_LIBS),yes)
27 LINK_MODE       = -export-dynamic
28 else
29 LINK_MODE       = -static
30 endif
31
32 TARGET          = $(LIBPREFIX)radius
33
34 # Define new rule for libtool objects
35 %.lo : %.c
36         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
37
38 all: $(TARGET).la
39
40 $(TARGET).la: $(LT_OBJS)
41         $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
42         $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^
43
44 $(LT_OBJS): $(INCLUDES)
45
46 clean:
47         rm -f *.o *.lo $(TARGET).la
48         rm -rf .libs
49
50 install: all
51         $(INSTALL) -d -m 755    $(R)$(libdir)
52         $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \
53                 $(R)$(libdir)/$(TARGET).la
54         rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
55         ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la