Imported Upstream version 0.9.1
[platform/upstream/iotivity.git] / resource / csdk / connectivity / lib / libcoap-4.1.1 / examples / Makefile.in
1 # Makefile for libcoap
2 #
3 # Copyright (C) 2010,2011 Olaf Bergmann <bergmann@tzi.org>
4 #
5 # This file is part of the CoAP library libcoap. Please see
6 # README for terms of use. 
7
8 # the library's version
9 VERSION:=@PACKAGE_VERSION@
10
11 # tools
12 @SET_MAKE@
13 SHELL = /bin/sh
14 MKDIR = mkdir
15
16 abs_builddir = @abs_builddir@
17 top_builddir = @top_builddir@
18 top_srcdir = @top_srcdir@
19 # files and flags
20 PROGRAMS:=coap-server coap-client rd etsi_iot_01 #tiny
21 SOURCES:= tiny.c client.c server.c rd.c etsi_iot_01.c
22 OBJECTS:= $(patsubst %.c, %.o, $(SOURCES))
23 #CFLAGS:=-g -Wall -ansi -pedantic -I..
24 CFLAGS:=-g -Wall @CFLAGS@
25 CPPFLAGS:=-I$(top_srcdir) @CPPFLAGS@
26 DISTDIR?=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
27 FILES:=Makefile.in $(SOURCES)
28 LDFLAGS:=-L$(top_builddir)
29 LDLIBS:=-lcoap @LIBS@
30 libcoap =$(top_builddir)/libcoap.a
31
32 .PHONY: clean distclean
33
34 .SUFFIXES:
35 .SUFFIXES:      .c .o
36
37 all:    $(PROGRAMS)
38
39 check:  
40         echo DISTDIR: $(DISTDIR)
41         echo top_builddir: $(top_builddir)
42
43 tiny:   tiny.o $(libcoap)
44         $(CC) -o $@ $< $(LDFLAGS)
45
46 coap-client: client.o $(libcoap)
47         $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS)
48
49 coap-server:    server.o $(libcoap)
50         $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS)
51
52 clean:
53         @rm -f $(PROGRAMS) $(OBJECTS)
54
55 distclean:      clean
56         @rm -rf $(DISTDIR)
57         @rm -f *~ 
58
59 dist:   $(FILES)
60         test -d $(DISTDIR)/examples || mkdir $(DISTDIR)/examples
61         cp $(FILES) $(DISTDIR)/examples
62