022729389f4a14fe0e032e99720ba3249d5cc266
[lttng-ust.git] / doc / examples / easy-ust / Makefile
1 # Copyright (C) 2011-2012 Matthew Khouzam <matthew.khouzam@ericsson.com>
2 # Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 #
4 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
5 # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
6 #
7 # Permission is hereby granted to use or copy this program for any
8 # purpose, provided the above notices are retained on all copies.
9 # Permission to modify the code and to distribute modified code is
10 # granted, provided the above notices are retained, and a notice that
11 # the code was modified is included with the above copyright notice.
12 #
13 # This makefile is not using automake so that users can see how to build
14 # a program with a statically embedded tracepoint provider probe.
15 # the "html" target helps for documentation (req. code2html)
16 #
17 # This makefile is purposefully kept simple to support GNU and BSD make.
18
19 LIBS = -ldl -llttng-ust # On Linux
20 #LIBS = -lc -llttng-ust # On BSD
21 LOCAL_CPPFLAGS += -I.
22
23 all: sample
24
25 sample: sample.o tp.o
26 $(CC) -o $@ $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
27 sample.o tp.o $(LIBS)
28
29 sample.o: sample.c sample_component_provider.h
30 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
31 $(CFLAGS) -c -o $@ $<
32
33 tp.o: tp.c sample_component_provider.h
34 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
35 $(CFLAGS) -c -o $@ $<
36
37 html: sample_component_provider.html sample.html tp.html
38
39 %.html: %.c
40 code2html -lc $< $@
41
42 %.html : %.h
43 code2html -lc $< $@
44
45 .PHONY: clean
46 clean:
47 rm -f *.html
48 rm -f *.o sample
This page took 0.028653 seconds and 3 git commands to generate.