2005-05-08 Alp Toker <alp@atoker.com>
[mono.git] / mcs / tools / cilc / Makefile
1 thisdir = tools/cilc
2 SUBDIRS = 
3 include ../../build/rules.make
4
5 PROGRAM = cilc.exe
6
7 # fixme: make clean doesn't know to rm -rf generated.
8 # and we can't extend the make clean target.
9
10 CLEAN_FILES = generated Demo.dll Demo.pdb
11
12 OTHER_RES = res-Makefile
13
14 RESOURCE_FILES = $(OTHER_RES)
15
16 EXTRA_DISTFILES = demo.c README TODO Test.cs $(RESOURCE_FILES)
17
18 include ../../build/executable.make
19
20 LOCAL_MCS_FLAGS=-r:Mono.Posix.dll $(OTHER_RES:%=-resource:%)
21
22 cilc.exe: $(RESOURCE_FILES)
23
24 test-local: Demo.dll
25
26 run-test-local: run-cilc-test
27
28 run-cilc-test: cilc.exe Demo.dll
29         rm -rf generated
30         $(RUNTIME) $(RUNTIME_FLAGS) cilc.exe Demo.dll generated
31         $(MAKE) -C generated
32         $(CCOMPILE) -Wall `pkg-config --cflags --libs glib-2.0 mono` -Igenerated -Lgenerated -ldemo demo.c -o generated/demo
33
34 Demo.dll: Test.cs
35         $(CSCOMPILE) /target:library /out:$@ $^