# Makefile for libcoap # # Copyright (C) 2012 Olaf Bergmann # # This file is part of the CoAP library libcoap. Please see # README for terms of use. # the library's version VERSION:=@PACKAGE_VERSION@ # tools @SET_MAKE@ SHELL = /bin/sh MKDIR = mkdir abs_builddir = @abs_builddir@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # files and flags ifneq (,@TESTS@) PROGRAMS:=testdriver endif SOURCES:= test_uri.c test_options.c test_pdu.c test_error_response.c \ test_sendqueue.c test_wellknown.c HEADERS:=$(SOURCES:.c=.h) OBJECTS:= $(patsubst %.c, %.o, $(SOURCES)) CFLAGS:=-g -Wall @CFLAGS@ CPPFLAGS:=-I$(top_srcdir) @CPPFLAGS@ DISTDIR?=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@ FILES:=Makefile.in testdriver.c $(HEADERS) $(SOURCES) LDFLAGS:=-L$(top_builddir) @LDFLAGS@ LDLIBS:=-lcunit @LIBS@ libcoap =$(top_builddir)/libcoap.a .PHONY: clean distclean .SUFFIXES: .SUFFIXES: .c .o all: $(PROGRAMS) check: echo DISTDIR: $(DISTDIR) echo top_builddir: $(top_builddir) testdriver: $(OBJECTS) $(libcoap) clean: @rm -f $(PROGRAMS) $(OBJECTS) distclean: clean @rm -rf $(DISTDIR) @rm -f *~ dist: $(FILES) test -d $(DISTDIR)/tests || mkdir $(DISTDIR)/tests cp $(FILES) $(DISTDIR)/tests