Link with libradius, too
[freeradius.git] / src / modules / rlm_eap / Makefile.in
1 #
2 # $Id$
3 #
4
5 TARGET      = @targetname@
6 SRCS        = rlm_eap.c eap.c mem.c
7 HEADERS     = eap.h rlm_eap.h
8 RLM_CFLAGS  = $(INCLTDL) -Ilibeap
9 CLIENTLIBS  = libeap/$(LIBPREFIX)freeradius-eap.la
10 RLM_LIBS    = libeap/$(LIBPREFIX)freeradius-eap.la $(LIBLTDL)
11 RLM_INSTALL = install-subdirs
12 RLM_SUBDIRS = libeap @eaptypes@
13 RLM_UTILS   = radeapclient
14
15 #
16 # Not using shared libraries, add in ALL known static modules
17 # at build time.
18 #
19 #ifneq ($(USE_SHARED_LIBS),yes)
20 #RLM_LIBS  += $(shell for x in types/rlm_eap*/rlm_eap*.la;do echo -dlpreopen $$x;done)
21 #endif
22
23 .PHONY: all install-subdirs common
24
25 #
26 # We need $(LIBPREFIX)freeradius-eap.la before we can build anything else
27 #
28 all: common
29
30 $(LT_OBJS): $(HEADERS)
31
32 radeapclient: radeapclient.lo $(CLIENTLIBS)
33         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) -o radeapclient radeapclient.lo $(LIBRADIUS) $(CLIENTLIBS) $(LIBS) $(OPENSSL_LIBS)
34
35 radeapclient.lo: radeapclient.c $(HEADERS)
36         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(RLM_CFLAGS) -c radeapclient.c
37
38 install-subdirs:
39         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
40         $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radeapclient$(EXEEXT) $(R)$(bindir)
41
42 .PHONY: common $(RLM_SUBDIRS)
43
44 common: $(RLM_SUBDIRS)
45
46 types: libeap
47
48 $(RLM_SUBDIRS):
49         @echo "Making $(WHAT_TO_MAKE) in $@..."
50         @$(MAKE) $(MFLAGS) -C $@ $(WHAT_TO_MAKE)
51
52 libeap/$(LIBPREFIX)freeradius-eap.la: libeap
53
54 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
55 include ../rules.mak