Tizen 2.1 base
[platform/upstream/gcd.git] / pthread_workqueue-0.8.2 / testing / witem_cache / Makefile
1 #
2 # Copyright (c) 2011 Mark Heily <mark@heily.com>
3 #
4 # Permission to use, copy, modify, and distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
7
8 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 #
16
17 .PHONY :: install uninstall check dist dist-upload publish-www clean merge distclean fresh-build rpm edit cscope valgrind
18
19 include ../../config.mk
20
21 all: test-$(PROGRAM)
22
23 test-$(PROGRAM): test.c
24         $(CC) $(CFLAGS) -g -O0 -o test-$(PROGRAM) -I../.. -I../../include -L../.. test.c -lpthread_workqueue -lpthread -lrt
25
26 check: test-$(PROGRAM)
27         LD_LIBRARY_PATH=../..:/usr/sfw/lib/amd64 ./test-$(PROGRAM)
28
29 debug: test-$(PROGRAM)
30         LD_LIBRARY_PATH=../.. gdb ./test-$(PROGRAM)
31
32 valgrind: test-$(PROGRAM)
33         LD_LIBRARY_PATH=../..:/usr/sfw/lib/amd64 \
34         valgrind --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=20 --track-fds=yes ./test-$(PROGRAM)
35
36 clean:
37         rm -f test-$(PROGRAM)