3d72407d5c51e4d915428a4ba1f4441310f505d0
[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 event.c getaddrinfo.c vqp.c \
13                   heap.c dhcp.c tcp.c base64.c
14
15 LT_OBJS         = $(SRCS:.c=.$(LO))
16
17 INCLUDES        = ../include/radius.h ../include/libradius.h \
18                   ../include/missing.h ../include/autoconf.h \
19                   ../include/ident.h
20
21 CFLAGS          += -D_LIBRADIUS -I$(top_builddir)/src
22
23 # if you have problems with things that need SHA1-HMAC, this will
24 # dump the key and the input to the hash so you can compare to what
25 # the other end is doing.
26 #CFLAGS += -DHMAC_SHA1_DATA_PROBLEMS
27
28 TARGET          = $(LIBPREFIX)freeradius-radius
29
30 # Define new rule for libtool objects
31 %.$(LO) : %.c
32         @echo CC $<
33         @$(COMPILE.c) $(CFLAGS) -c $<
34
35 .PHONY: all clean install reconfig
36 all: $(TARGET).$(LA)
37
38 $(TARGET).$(LA): $(LT_OBJS)
39         @echo LINK $@ $^
40         @$(LINK.lib) $@ $(LDFLAGS) $^
41
42 $(LT_OBJS): $(INCLUDES)
43
44 clean:
45         @rm -f *.$(LO) $(TARGET).$(LA)
46         @rm -rf .libs
47
48 install: all
49         $(INSTALL) -d -m 755    $(R)$(libdir)
50         $(LIBTOOL) --mode=install $(INSTALL) -c -rpath $(libdir) $(TARGET).la \
51                 $(R)$(libdir)/$(TARGET).la
52         rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
53         ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la
54
55 reconfig: