2014-09-14 22:46:14 +02:00
|
|
|
include ../WtpConfig.mak
|
2015-02-01 16:55:45 +01:00
|
|
|
include ../Macros.mak
|
2014-09-14 22:46:14 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
ifndef CC
|
2014-07-20 19:32:58 +02:00
|
|
|
CC=gcc
|
2014-07-11 22:12:11 +02:00
|
|
|
endif
|
|
|
|
|
2014-08-21 13:00:32 +02:00
|
|
|
|
2015-04-07 07:42:36 +02:00
|
|
|
V=0
|
2014-07-20 19:32:58 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
CFLAGS+=-DWITH_RMAC_SUPPORT
|
|
|
|
CFLAGS+=-DWITH_IPV6
|
|
|
|
CFLAGS+=-DWITH_CW_LOG
|
|
|
|
CFLAGS+=-DWITH_CW_LOG_DEBUG
|
|
|
|
CFLAGS+=-DWITH_DTLS
|
|
|
|
|
|
|
|
|
|
|
|
ifndef ARCH
|
2014-07-20 07:53:49 +02:00
|
|
|
ARCH = $(shell $(CC) -dumpmachine)
|
2014-07-11 22:12:11 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2015-04-14 07:42:23 +02:00
|
|
|
#CFLAGS += -O0 -Wall -g
|
|
|
|
CFLAGS += -Os -Wall
|
|
|
|
LDFLAGS += -L../contrib/jsmn -L../../src/capwap/$(ARCH)
|
2014-09-14 22:46:14 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
LIBS+=-lcapwap
|
2014-10-26 11:33:11 +01:00
|
|
|
LIBS+=-lnl-3
|
|
|
|
LIBS+=-lnl-genl-3
|
2015-04-14 07:42:23 +02:00
|
|
|
LIBS+=-ljsmn
|
2015-02-08 21:07:55 +01:00
|
|
|
|
|
|
|
CONFOBJS = wtp_conf.o
|
|
|
|
|
|
|
|
ifeq ($(CONF_LIBRARY),UCI)
|
|
|
|
CFLAGS+=-DWITH_UCI
|
2014-07-20 19:32:58 +02:00
|
|
|
LIBS+=-luci -lubox
|
2015-02-08 21:07:55 +01:00
|
|
|
CONFOBJS += conf_uci.o
|
2014-07-20 19:32:58 +02:00
|
|
|
else
|
2014-07-11 22:12:11 +02:00
|
|
|
LIBS+=-lconfuse
|
2015-02-08 21:07:55 +01:00
|
|
|
CONFOBJS += wtp_conf_confuse.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(SSL_LIBRARY),GNUTLS)
|
|
|
|
CFLAGS+=-DWITH_GNUTLS
|
|
|
|
CFLAGS+=$(GNUTLS_CFLAGS)
|
|
|
|
LIBS+=$(GNUTLS_LIBS)
|
|
|
|
LDFLAGS+=$(GNUTLS_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(SSL_LIBRARY),OPENSSL)
|
|
|
|
CFLAGS+=-DWITH_OPENSSL
|
|
|
|
CFLAGS+=$(OPESSL_CFLAGS)
|
|
|
|
LDFLAGS+=$(OPENSSL_LDFLAGS)
|
|
|
|
LIBS+=$(OPENSSL_LIBS)
|
2014-07-20 19:32:58 +02:00
|
|
|
endif
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-08 21:07:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-14 22:46:14 +02:00
|
|
|
#HA_FILES += ../contrib/hostap/src/drivers/driver_nl80211.o
|
|
|
|
|
|
|
|
HA_INCS += -I$(INCLUDE_DIR)/libnl-tiny
|
|
|
|
HA_INCS += -I../contrib/hostap/src/utils
|
|
|
|
HA_INCS += -I../contrib/hostap/src
|
|
|
|
|
|
|
|
CFLAGS += $(HA_INCS)
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-09-14 22:46:14 +02:00
|
|
|
#CFLAGS += -I../src
|
|
|
|
#CFLAGS += -I../src/utils
|
2015-04-14 07:42:23 +02:00
|
|
|
CFLAGS += -I../../src -I /usr/local/include -I ../contrib/jsmn
|
2014-09-14 22:46:14 +02:00
|
|
|
|
|
|
|
#CFLAGS += -I/usr/local/include
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-20 19:32:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
OBJS += wtp_main.o
|
2015-04-11 19:00:51 +02:00
|
|
|
OBJS += image_update.o
|
2015-04-14 07:42:23 +02:00
|
|
|
OBJS += cfg.o
|
2015-04-11 19:00:51 +02:00
|
|
|
|
2014-07-20 19:32:58 +02:00
|
|
|
|
|
|
|
#OBJS += wtp_conf.o
|
|
|
|
|
2014-09-14 22:46:14 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
OBJS += discovery.o
|
|
|
|
OBJS += wtp_interface.o
|
|
|
|
OBJS += wtpdrv.o
|
2014-11-10 00:16:55 +01:00
|
|
|
OBJS += dot11.o
|
2014-07-11 22:12:11 +02:00
|
|
|
OBJS += join.o
|
|
|
|
OBJS += run.o
|
|
|
|
OBJS += sulking.o
|
2014-07-19 13:26:01 +02:00
|
|
|
OBJS += configure.o
|
2014-07-20 19:32:58 +02:00
|
|
|
OBJS += $(CONFOBJS)
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-09-14 22:46:14 +02:00
|
|
|
|
|
|
|
OBJS += nlt_attrnames.o
|
2014-09-22 06:57:50 +02:00
|
|
|
OBJS += nlt_cmdnames.o
|
2014-12-13 09:00:04 +01:00
|
|
|
OBJS += nlt.o
|
2014-09-14 22:46:14 +02:00
|
|
|
|
|
|
|
#OBJS += $(HA_FILES)
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
ALL=wtp
|
|
|
|
|
|
|
|
all: $(ALL)
|
|
|
|
|
2015-04-07 07:42:36 +02:00
|
|
|
Q=@
|
2014-07-11 22:12:11 +02:00
|
|
|
E=echo
|
|
|
|
ifeq ($(V), 1)
|
|
|
|
Q=
|
|
|
|
E=true
|
|
|
|
endif
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(E) " CC " $<
|
2015-04-07 07:42:36 +02:00
|
|
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
wtp: $(BCHECK) $(OBJS)
|
2015-02-08 21:07:55 +01:00
|
|
|
$(Q)$(CC) $(OBJS) -o wtp $(LDFLAGS) $(LIBS)
|
2014-07-11 22:12:11 +02:00
|
|
|
@$(E) " LD " $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
# $(MAKE) -C ../src clean
|
|
|
|
rm -f *.o
|
|
|
|
rm -f *.d
|
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|