document rlm_otp fd leak fix
[freeradius.git] / src / modules / rlm_eap / libeap / Makefile
1 #
2 # Makefile
3 #
4 # Version:      $Id$
5 #
6
7 include ../../../../Make.inc
8
9 SRCS            = eapcommon.c eapcrypto.c eapsimlib.c fips186prf.c
10 ifneq ($(OPENSSL_LIBS),)
11 SRCS            += cb.c eap_tls.c mppe_keys.c tls.c
12 endif
13 LT_OBJS         = $(SRCS:.c=.lo)
14 INCLUDES        = eap_types.h eap_tls.h
15 CFLAGS          += -DEAPLIB -I. -I.. -I$(top_builddir)/src $(OPENSSL_INCLUDE)
16 ifeq ($(USE_SHARED_LIBS),yes)
17 LINK_MODE       = -export-dynamic
18 else
19 LINK_MODE       = -static
20 endif
21 TARGET          = $(LIBPREFIX)eap
22
23 # Define new rule for libtool objects
24 %.lo: %.c
25         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
26
27 all: $(TARGET).la
28
29 $(TARGET).la: $(LT_OBJS)
30         $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
31         $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ \
32         $(top_builddir)/src/lib/libradius.la $(LIBS)
33
34 $(LT_OBJS): $(INCLUDES)
35
36 clean:
37         rm -f *.o *.lo $(TARGET).la
38         rm -rf .libs
39
40 install: all
41         $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \
42                 $(R)$(libdir)/$(TARGET).la
43         rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
44         ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la