2002-11-04 Stuart Caborn <stuart.caborn@clearswift.com>
[mono.git] / mcs / class / executable.make
1 MCS = mcs
2 MCS_FLAGS = --target exe
3 INSTALL = /usr/bin/install
4 prefix = /usr
5
6 all: $(PROGRAM)
7
8 clean:
9         -rm -rf $(PROGRAM) .response-exe .makefrag-exe
10
11 .response-exe: $(PROGRAM_LIST)
12         cat $^ |egrep '\.cs$$' >$@
13
14 .makefrag-exe: $(PROGRAM_LIST)
15         echo -n "program-deps: " >$@.new
16         cat $^ |egrep '\.cs$$' | sed -e 's,\.cs,.cs \\,' >>$@.new
17         cat $@.new |sed -e '$$s, \\$$,,' >$@
18         rm -rf $@.new
19
20 -include .makefrag-exe
21
22 $(PROGRAM): .response-exe .makefrag-exe #program-deps
23         $(MCS) $(MCS_FLAGS) -o $(PROGRAM) $(PROGRAM_FLAGS) @.response-exe
24
25 install: all
26         mkdir -p $(prefix)/bin/
27         $(INSTALL) -m 755 $(PROGRAM) $(prefix)/bin/
28