1 #######################################################################
3 # TARGET should be set by autoconf only. Don't touch it.
5 # The SRCS definition should list ALL source files.
7 # The HEADERS definition should list ALL header files
9 # RLM_CFLAGS defines addition C compiler flags. You usually don't
10 # want to modify this, though. Get it from autoconf.
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.
19 # RLM_INSTALL is the names of additional rules you need to install
20 # some particular portion of the module. Usually, leave it blank.
22 #######################################################################
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)
33 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
36 # Not part of RLM_CFLAGS to avoid propagation to subdirs
37 CFLAGS += -Wno-unused-label -Wno-cast-qual
39 $(STATIC_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
41 $(DYNAMIC_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
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 $?; \