Removed extraneous -shared
[freeradius.git] / src / modules / rlm_eap / Makefile.in
1 TARGET      = @targetname@
2 SRCS        = rlm_eap.c eap.c mem.c state.c
3 HEADERS     = eap.h rlm_eap.h
4 RLM_CFLAGS  = $(INCLTDL) -I@srcdir@/libeap
5 CLIENTLIBS  = libeap/libeap.la -L../../lib -lradius
6 RLM_LIBS    = libeap/libeap.la $(LIBLTDL)
7 #RLM_LIBS    = $(shell for x in types/rlm_eap*/rlm_eap*.la;do echo -dlpreopen $$x;done)
8 RLM_INSTALL = install-types
9 RLM_SUBDIRS = libeap @eaptypes@ 
10 RLM_UTILS   = radeapclient
11
12 .PHONY: all install-types common
13
14 $(STATIC_OBJS): $(HEADERS)
15
16 #
17 #  Statically link a few modules.
18
19 STATIC_OBJS     += $(shell ls -1 types/rlm_eap_gtc/rlm_eap_gtc.a types/rlm_eap_leap/rlm_eap_leap.a types/rlm_eap_md5/rlm_eap_md5.a types/rlm_eap_mschapv2/rlm_eap_mschapv2.a types/rlm_eap_peap/rlm_eap_peap.a types/rlm_eap_sim/rlm_eap_sim.a types/rlm_eap_tls/rlm_eap_tls.a types/rlm_eap_ttls/rlm_eap_ttls.a 2>/dev/null)
20
21 $(DYNAMIC_OBJS): $(HEADERS)
22
23 all: common
24         @$(MAKE) $(MFLAGS) radeapclient
25
26 radeapclient: radeapclient.o ../../lib/libradius.la
27         (cd libeap && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1
28         $(LIBTOOL) --mode=link $(CC) $(CFLAGS) ${RLM_CFLAGS} $(LDFLAGS) -o radeapclient radeapclient.o -static $(CLIENTLIBS) $(LIBS) $(LCRYPT)
29
30 radeapclient.o: radeapclient.c $(INCLUDES)
31         $(CC) $(CFLAGS) ${RLM_CFLAGS} -c radeapclient.c
32
33 install-types: 
34         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
35         $(INSTALL) -m 755 radeapclient  $(R)$(bindir)
36
37 common:
38         @for dir in $(RLM_SUBDIRS); do  \
39                 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
40                 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
41         done
42
43 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
44 include ../rules.mak
45