2
# $Id: Makefile.in,v 1.12.2.2.2.4 2006/05/25 16:24:41 nbk Exp $
1
5
TARGET = @targetname@
2
6
SRCS = rlm_eap.c eap.c mem.c state.c
3
7
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@
8
RLM_CFLAGS = $(INCLTDL) -Ilibeap
9
CLIENTLIBS = libeap/libeap.la
10
RLM_LIBS = libeap/libeap.la $(LIBLTDL)
11
RLM_INSTALL = install-subdirs
12
RLM_SUBDIRS = libeap @eaptypes@
10
13
RLM_UTILS = radeapclient
12
.PHONY: all install-types common
14
$(STATIC_OBJS): $(HEADERS)
17
# Statically link a few modules.
19
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)
21
$(DYNAMIC_OBJS): $(HEADERS)
24
@$(MAKE) $(MFLAGS) static dynamic
25
@$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
26
@$(MAKE) $(MFLAGS) radeapclient
28
radeapclient: radeapclient.o ../../lib/libradius.a
29
(cd libeap && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1
30
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) ${RLM_CFLAGS} $(LDFLAGS) -o radeapclient radeapclient.o $(CLIENTLIBS) $(LIBS) $(LCRYPT)
32
radeapclient.o: radeapclient.c $(INCLUDES)
33
$(CC) $(CFLAGS) ${RLM_CFLAGS} -c radeapclient.c
16
# Not using shared libraries, add in ALL known static modules
19
#ifneq ($(USE_SHARED_LIBS),yes)
20
#RLM_LIBS += $(shell for x in types/rlm_eap*/rlm_eap*.la;do echo -dlpreopen $$x;done)
23
.PHONY: all install-subdirs common
26
# We need libeap.la before we can build anything else
30
$(LT_OBJS): $(HEADERS)
32
radeapclient: radeapclient.lo $(CLIENTLIBS)
33
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) -o radeapclient radeapclient.lo $(CLIENTLIBS) $(LIBS) $(OPENSSL_LIBS)
35
radeapclient.lo: radeapclient.c $(HEADERS)
36
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(RLM_CFLAGS) -c radeapclient.c
36
39
@$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
37
$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radeapclient$(EXEEXT) $(R)$(bindir)
40
$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radeapclient$(EXEEXT) $(R)$(bindir)
40
43
@for dir in $(RLM_SUBDIRS); do \
41
44
echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
42
(cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
45
$(MAKE) $(MFLAGS) -C $$dir $(WHAT_TO_MAKE) || exit $$?; \
45
48
## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
46
49
include ../rules.mak