Fix missing make dependancy on radeapclient when installling.
[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  = -Llibeap -leap -L../../lib -lradius
6 RLM_LIBS    = -Llibeap -leap
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
11
12 $(STATIC_OBJS): $(HEADERS)
13
14 #
15 #  Statically link a few modules.
16
17 STATIC_OBJS     += $(shell ls -1 types/rlm_eap_md5/rlm_eap_md5.a types/rlm_eap_leap/rlm_eap_leap.a types/rlm_eap_tls/rlm_eap_tls.a types/rlm_eap_ttls/rlm_eap_ttls.a types/rlm_eap_sim/rlm_eap_sim.a 2>/dev/null)
18
19 $(DYNAMIC_OBJS): $(HEADERS)
20
21 all: 
22         @$(MAKE) $(MFLAGS) static dynamic
23         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
24         @$(MAKE) $(MFLAGS) radeapclient
25
26 radeapclient: radeapclient.o ../../lib/libradius.a
27         $(LIBTOOL) --mode=link $(CC) $(CFLAGS) ${RLM_CFLAGS} $(LDFLAGS) -o radeapclient radeapclient.o $(CLIENTLIBS) $(LIBS) $(LCRYPT)
28
29 radeapclient.o: radeapclient.c $(INCLUDES)
30         $(CC) $(CFLAGS) ${RLM_CFLAGS} -c radeapclient.c
31
32 allclean:
33         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=clean common
34
35 install-types: radeapclient
36         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
37         $(INSTALL) -m 755 radeapclient  $(R)$(bindir)
38
39 common:
40         @for dir in $(RLM_SUBDIRS); do  \
41                 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
42                 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
43         done
44
45 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
46 include ../rules.mak
47