Move the SoH code to the server directory
[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
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 ifeq ($(USE_SHARED_LIBS),yes)
29 LINK_MODE       = -export-dynamic
30 else
31 LINK_MODE       = -static
32 endif
33
34 TARGET          = $(LIBPREFIX)freeradius-radius
35
36 # Define new rule for libtool objects
37 %.lo : %.c
38         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
39
40 .PHONY: all clean install reconfig
41 all: $(TARGET).la
42
43 $(TARGET).la: $(LT_OBJS)
44         $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
45         $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^
46
47 $(LT_OBJS): $(INCLUDES)
48
49 clean:
50         rm -f *.o *.lo $(TARGET).la
51         rm -rf .libs
52
53 install: all
54         $(INSTALL) -d -m 755    $(R)$(libdir)
55         $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \
56                 $(R)$(libdir)/$(TARGET).la
57         rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
58         ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la
59
60 reconfig: