1top_srcdir ?= ../.. 2 3# coap library 4 5CFLAGS += -std=gnu99 6 7CFLAGS += -I$(top_srcdir)/include/coap -DCOAP_RESOURCES_NOHASH 8 9vpath %.c $(top_srcdir)/src 10 11COAPOBJS = net.o debug.o option.o resource.o hashkey.o pdu.o encode.o subscribe.o coap_io.o block.o uri.o mem.o 12 13CFLAGS += -I$(CONTIKI)/core/ -I$(CONTIKI)/core/sys/ -I$(CONTIKI)/core/net/ip/ -I$(CONTIKI)/core/lib/ $(PLATFORM_CFLAGS) 14CPPFLAGS += $(PLATFORM_CPPFLAGS) 15 16# making an executable out of all of it 17 18OBJS = server.o ${CONTIKIOBJS} ${COAPOBJS} 19 20server: ${OBJS} 21 22symbols.h: $(CONTIKI)/tools/empty-symbols.h 23 cp -p $< $@ 24 25symbols.c: $(CONTIKI)/tools/empty-symbols.c 26 cp -p $< $@ 27 28symbols.o: symbols.c symbols.h 29 30clean: 31 rm -f core server ${OBJS} symbols.c symbols.h 32 33distclean: clean 34 rm -rf *~ *.o contiki 35 36.PHONY: clean distclean contiki 37