2018-03-20 11:57:44 +01:00
|
|
|
include ../Defs.mak
|
|
|
|
|
2018-02-26 00:19:44 +01:00
|
|
|
include ../Config.mak
|
|
|
|
include ../ACConfig.mak
|
|
|
|
-include ../Config.local.mak
|
2018-03-02 00:12:38 +01:00
|
|
|
-include ../ACConfig.local.mak
|
|
|
|
include ../Macros.mak
|
2014-08-19 19:31:01 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2018-02-26 00:19:44 +01:00
|
|
|
LIBARCHDIR=../../lib/$(ARCH)
|
|
|
|
|
2018-03-02 00:12:38 +01:00
|
|
|
LDFLAGS+=-g -L/usr/local/lib -L$(LIBARCHDIR)
|
2018-02-26 00:19:44 +01:00
|
|
|
CFLAGS += -W -g -O0 -D_REENTRANT -DIPV6 -I/usr/local/include -I../ -DSYS_ARCH=\"${ARCH}\"
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
2018-02-26 00:19:44 +01:00
|
|
|
#LIBS+=-lcapwap
|
|
|
|
#LIBS+=-lcapwap80211
|
|
|
|
#LIBS+=-lcipwap
|
|
|
|
#LIBS+=-lcisco
|
|
|
|
#LIBS+=-lfortinet
|
|
|
|
#LIBS+=-lzyxel
|
2016-02-26 23:33:30 +01:00
|
|
|
LIBS+=-lcw
|
2014-07-11 22:12:11 +02:00
|
|
|
LIBS+=-lrt
|
|
|
|
LIBS+=-lpthread
|
|
|
|
LIBS+=-lconfuse
|
|
|
|
LIBS+=-lsqlite3
|
2018-03-17 20:13:46 +01:00
|
|
|
#LIBS+=-ldl
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
2014-08-20 19:56:11 +02:00
|
|
|
ifeq ($(SSL_LIBRARY),GNUTLS)
|
|
|
|
CFLAGS+=-DWITH_GNUTLS
|
2015-02-08 11:42:01 +01:00
|
|
|
CFLAGS+=$(GNUTLS_CFLAGS)
|
|
|
|
LIBS+=$(GNUTLS_LIBS)
|
|
|
|
LDFLAGS+=$(GNUTLS_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(SSL_LIBRARY),OPENSSL)
|
2014-08-20 19:56:11 +02:00
|
|
|
CFLAGS+=-DWITH_OPENSSL
|
2015-02-08 11:42:01 +01:00
|
|
|
CFLAGS+=$(OPESSL_CFLAGS)
|
|
|
|
LDFLAGS+=$(OPENSSL_LDFLAGS)
|
|
|
|
LIBS+=$(OPENSSL_LIBS)
|
2014-08-03 21:39:31 +02:00
|
|
|
endif
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
CFLAGS += -DWITH_CW_LOG
|
|
|
|
CFLAGS += -DWITH_CW_LOG_DEBUG
|
2015-02-08 11:42:01 +01:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
CFLAGS += -DWITH_RMAC_SUPPORT
|
|
|
|
CFLAGS += -DWITH_DTLS
|
|
|
|
CFLAGS += -DWITH_IPV6
|
2014-08-24 11:10:21 +02:00
|
|
|
#CFLAGS += -DWITH_LWAPP
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
RM = /bin/rm -f
|
|
|
|
|
2018-02-26 00:19:44 +01:00
|
|
|
#AC_MODULES = mod_cipwap.o
|
2016-02-14 17:30:14 +01:00
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
# list of generated object files for AC.
|
2016-02-14 17:30:14 +01:00
|
|
|
AC_OBJS = \
|
|
|
|
wtplist.o wtpman.o conf.o ac_main.o \
|
2016-04-10 16:04:58 +02:00
|
|
|
dataman.o \
|
2016-02-14 17:30:14 +01:00
|
|
|
ac_interface.o \
|
|
|
|
socklist.o \
|
|
|
|
db.o \
|
|
|
|
ac_global.o \
|
|
|
|
${AC_MODULES}
|
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
AC_SRCS = $(AC_OBJS:.o=.c)
|
|
|
|
AC_DEPS := $(AC_OBJS:.o=.d)
|
|
|
|
|
|
|
|
AC_NAME = actube
|
|
|
|
|
|
|
|
.PHONY: deps clean clean_libs libs
|
|
|
|
|
|
|
|
# top-level rule, to compile everything.
|
|
|
|
all: $(AC_NAME)
|
|
|
|
|
2015-04-05 02:07:59 +02:00
|
|
|
%.o:%.c
|
2018-02-26 00:19:44 +01:00
|
|
|
@echo " $(CC) "$<
|
2015-04-05 02:07:59 +02:00
|
|
|
@$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
$(AC_NAME): $(AC_OBJS)
|
2018-02-26 00:19:44 +01:00
|
|
|
# $(CC) $(AC_OBJS) ../mod/modload_ac.o -o $(AC_NAME) $(LDFLAGS) $(LIBS)
|
2018-03-02 00:12:38 +01:00
|
|
|
$(LD) $(AC_OBJS) -o $(AC_NAME) $(LDFLAGS) $(LIBS)
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(AC_NAME) $(AC_OBJS) $(AC_DEPS)
|
|
|
|
|
|
|
|
clean_deps:
|
|
|
|
$(AC_DEPS)
|
|
|
|
|
|
|
|
deps: $(AC_SRC)
|
2018-03-02 00:12:38 +01:00
|
|
|
$(LD) -MD -E $(AC_SRCS) $(CFLAGS) >/dev/null
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
-include $(AC_DEPS)
|