import from HEAD:
[freeradius.git] / src / modules / rlm_otp / Makefile.in
1 #######################################################################
2 #
3 # TARGET should be set by autoconf only.  Don't touch it.
4 #
5 # The SRCS definition should list ALL source files.
6 #
7 # The HEADERS definition should list ALL header files
8 #
9 # RLM_CFLAGS defines addition C compiler flags.  You usually don't
10 # want to modify this, though.  Get it from autoconf.
11 #
12 # The RLM_LIBS definition should list ALL required libraries.
13 # These libraries really should be pulled from the 'config.mak'
14 # definitions, if at all possible.  These definitions are also
15 # echoed into another file in ../lib, where they're picked up by
16 # ../main/Makefile for building the version of the server with
17 # statically linked modules.  Get it from autoconf.
18 #
19 # RLM_INSTALL is the names of additional rules you need to install 
20 # some particular portion of the module.  Usually, leave it blank.
21 #
22 #######################################################################
23 TARGET         = @targetname@
24 SRCS           = otp_rlm.c otp_util.c otp_radstate.c otp_x99.c otp_state.c
25 SRCS          += otp_site.c otp_pwe.c otp_log.c otp_cardops.c otp_hotp.c
26 HEADERS        = otp.h otp_rad.h otp_pwe.h otp_cardops.h
27 RLM_CFLAGS     = @otp_cflags@ $(OPENSSL_INCLUDE)
28 CARDOPS_LTLIBS = $(patsubst %.c,%.lo,$(wildcard cardops/*.c))
29 RLM_LIBS       = @otp_ldflags@ $(OPENSSL_LIBS) $(CARDOPS_LTLIBS)
30
31 RLM_SUBDIRS = cardops
32
33 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
34 include ../rules.mak
35
36 # Not part of RLM_CFLAGS to avoid propagation to subdirs
37 CFLAGS     += -Wno-unused-label -Wno-cast-qual
38
39 $(STATIC_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
40
41 $(DYNAMIC_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
42
43 # Note: dynamic libs only
44 $(CARDOPS_LTLIBS) common:
45         @what=$(WHAT_TO_MAKE); \
46         [ -z "$$what" ] && what=dynamic; \
47         for dir in $(RLM_SUBDIRS); do \
48                 echo "Making $$what in $$dir ..."; \
49                 $(MAKE) $(MFLAGS) -C $$dir RLM_CFLAGS="$(RLM_CFLAGS)" $$what || exit $?; \
50         done