Files
libcoap/examples/lwip/Makefile
T
Olaf Bergmann 96d572d309 prng.c: move platform-specific PRNG invocation into separate files
This change introduces a new subtree in the library's directory structure.
Platform-specific code now should be placed into the corresponding directory
in src/platform/. To illustrate this, prng.h has been split into three
distinct files, one for each platform (contiki, lwip, posix) and moved into
the respective subdirectory.
2016-04-08 15:14:20 +02:00

49 lines
1.5 KiB
Makefile

top_srcdir = ../..
WITH_BRANCH=-b STABLE-1_4_1
all: server
lwip:
git clone --depth 1 git://git.savannah.nongnu.org/lwip.git $(WITH_BRANCH)
curl -L 'https://savannah.nongnu.org/bugs/download.php?file_id=28185' -o lwip/memp.patch
cd lwip && patch -p1 < memp.patch
lwip-contrib:
git clone --depth 1 git://git.savannah.nongnu.org/lwip/lwip-contrib.git $(WITH_BRANCH)
# lwip and coap opts (include early to shadow the lwip-contrib/ports/unix/proj/minimal/ file and any ../../config.h)
CFLAGS += -DWITH_LWIP -iquote.
# lwip library
LWIPOBJS = def.o init.o mintapif.o etharp.o netif.o timer.o timers.o stats.o mem.o memp.o udp.o tcp.o pbuf.o ip_addr.o ip.o inet_chksum.o tcp_in.o tcp_out.o icmp.o raw.o ip_frag.o sys_arch.o
vpath %.c lwip/src/core/ lwip-contrib/ports/unix/proj/minimal/ lwip/src/netif/ lwip/src/core/ipv4/ lwip-contrib/ports/unix/
# coap library
CFLAGS += -std=gnu99
CFLAGS += -I$(top_srcdir)/include/coap
vpath %.c $(top_srcdir)/src $(top_srcdir)/src/platform/lwip
COAPOBJS = net.o debug.o option.o resource.o hashkey.o pdu.o encode.o subscribe.o coap_io_lwip.o block.o uri.o prng.o
CFLAGS += -g3 -Wall -pedantic -Dopenbsd -DIPv4 -O0 -fpack-struct
CFLAGS += -Ilwip/src/include/ -Ilwip/src/include/ipv4/ -Ilwip-contrib/ports/unix/include/ -Ilwip-contrib/ports/unix/proj/minimal/
${LWIPOBJS}: lwip lwip-contrib
# making an executable out of all of it
OBJS = server.o server-coap.o ${LWIPOBJS} ${COAPOBJS}
server: ${OBJS}
clean:
rm -f ${OBJS}
.PHONY: clean