This attempt at static linking appears to work a bit better
[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)
5 RLM_LIBS    = $(shell for x in types/rlm_eap*/rlm_eap*.la;do echo -dlpreopen $$x;done)
6 RLM_INSTALL = install-types
7 RLM_SUBDIRS = @eaptypes@
8
9
10 $(STATIC_OBJS): $(HEADERS)
11
12 #
13 #  Statically link MD5 and LEAP.  They don't require any extra magic.
14 #
15 STATIC_OBJS     += $(shell ls -1 types/rlm_eap_leap/rlm_eap_md5.a types/rlm_eap_md5/rlm_eap_leap.a 2>/dev/null)
16
17 $(DYNAMIC_OBJS): $(HEADERS)
18
19 all: 
20         @$(MAKE) $(MFLAGS) static dynamic
21         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
22
23 allclean:
24         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=clean common
25
26 install-types:
27         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
28
29 common:
30         @for dir in $(RLM_SUBDIRS); do  \
31                 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
32                 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
33         done
34
35 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
36 include ../rules.mak
37