2014-08-19 19:31:01 +02:00
|
|
|
|
2015-02-08 12:35:34 +01:00
|
|
|
include ../ACConfig.mak
|
2014-08-20 19:56:11 +02:00
|
|
|
include ../Macros.mak
|
2014-08-19 19:31:01 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
ifndef CC
|
2014-07-13 00:24:24 +02:00
|
|
|
CC=gcc
|
2014-07-11 22:12:11 +02:00
|
|
|
endif
|
2015-02-08 11:42:01 +01:00
|
|
|
#SYSARCH := $(shell uname -m)
|
2014-07-11 22:12:11 +02:00
|
|
|
ifndef ARCH
|
2014-07-20 12:49:17 +02:00
|
|
|
ARCH = $(shell $(CC) -dumpmachine)
|
2014-07-11 22:12:11 +02:00
|
|
|
endif
|
|
|
|
|
2015-02-08 11:42:01 +01:00
|
|
|
LDFLAGS+=-g -D_REENTRANT -L/usr/local/lib -L../capwap/$(ARCH)
|
2015-04-07 07:42:36 +02:00
|
|
|
CFLAGS += -Wall -g -O0 -D_REENTRANT -DIPV6 -I/usr/local/include -I../
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
LIBS+=-lcapwap
|
|
|
|
LIBS+=-lrt
|
|
|
|
LIBS+=-lpthread
|
|
|
|
LIBS+=-lconfuse
|
|
|
|
LIBS+=-lsqlite3
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# list of generated object files for AC.
|
|
|
|
AC_OBJS = wtplist.o wtpman.o conf.o ac_main.o \
|
|
|
|
ac_interface.o \
|
|
|
|
socklist.o \
|
|
|
|
db.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
ac_global.o
|
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
|
|
|
|
@echo " CC "$<
|
|
|
|
@$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
$(AC_NAME): $(AC_OBJS)
|
2015-02-08 11:42:01 +01:00
|
|
|
$(CC) $(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)
|
|
|
|
$(CC) -MD -E $(AC_SRCS) $(CFLAGS) >/dev/null
|
|
|
|
|
|
|
|
-include $(AC_DEPS)
|