ethernetgmii: make design files compile (warning: takes longer than 1 hour)
[ana-net.git] / sem / Makefile
blobbc7fe83286766c8109be5b795266b324d0321bfa
2 # Lightweight Autonomic Network Architecture
4 # Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 # Swiss federal institute of technology (ETH Zurich)
6 # Subject to the GPL.
9 cocc-objs-p = \
10 api/alloc/kzalloc-simple.cocc \
11 api/alloc/drop_kmalloc_cast.cocc \
12 api/err_cast.cocc \
13 api/memdup.cocc \
14 api/resource_size.cocc \
15 api/kstrdup.cocc \
16 api/memdup_user.cocc \
17 locks/call_kern.cocc \
18 null/eno.cocc \
19 iterators/itnull.cocc \
20 iterators/fen.cocc
22 cocc-objs-n = \
23 tests/notnull.cocc
25 cocc-objs-r = \
26 locks/double_lock.cocc \
27 locks/flags.cocc \
28 locks/mini_lock.cocc \
29 null/kmerr.cocc \
30 null/deref_null.cocc \
31 free/kfree.cocc \
32 iterators/list_entry_update.cocc \
33 tests/doubletest.cocc \
34 tests/doublebitand.cocc \
35 misc/doubleinit.cocc \
36 misc/ifcol.cocc
38 chk-objs = $(shell find ../src -name "*.[ch]")
40 .PHONY: $(cocc-objs)
42 all: $(cocc-objs-p) $(cocc-objs-r) $(cocc-objs-n)
44 spatch:
45 wget http://coccinelle.lip6.fr/distrib/coccinelle-1.0.0-rc7.tgz
46 tar xvf coccinelle-1.0.0-rc7.tgz
47 cd coccinelle-1.0.0-rc7/ && ./configure --prefix=/usr/ && make depend && make all && make install
49 $(cocc-objs-p): %.cocc: %.cocci
50 @echo "\n++++++ Applying $< ++++++\n"
51 for f in $(chk-objs) ; do \
52 spatch -D patch -local_includes -out_place -sp_file $< $$f || exit; \
53 done
55 $(cocc-objs-n): %.cocc: %.cocci
56 @echo "\n++++++ Applying $< ++++++\n"
57 for f in $(chk-objs) ; do \
58 spatch -local_includes -out_place -sp_file $< $$f || exit; \
59 done
61 $(cocc-objs-r): %.cocc: %.cocci
62 @echo "\n++++++ Applying $< ++++++\n"
63 for f in $(chk-objs) ; do \
64 spatch -D report -local_includes -out_place -sp_file $< $$f || exit; \
65 done
67 clean:
68 @rm *.cocci_res