2002-08-09 Nick Drochak <ndrochak@gol.com>
[mono.git] / mcs / class / library.make
1 MCS = mono $(topdir)/mcs/mcs.exe
2 MCS_FLAGS = --target library --noconfig
3 INSTALL = /usr/bin/install
4 prefix = /usr
5
6 all: .makefrag $(LIBRARY)
7
8 clean:
9         -rm -rf $(LIBRARY) .response .makefrag library-deps.stamp
10
11 .response: $(LIB_LIST)
12         cat $^ |egrep '\.cs$$' >$@
13
14 .makefrag: $(LIB_LIST) $(topdir)/class/library.make
15         echo -n "library-deps.stamp: " >$@.new
16         cat $^ |egrep '\.cs$$' | sed -e 's,\.cs,.cs \\,' >>$@.new
17         cat $@.new |sed -e '$$s, \\$$,,' >$@
18         echo -e "\ttouch library-deps.stamp" >>$@
19         rm -rf $@.new
20
21 -include .makefrag
22
23 $(LIBRARY): .response library-deps.stamp
24         MONO_PATH=$(MONO_PATH_PREFIX)$(MONO_PATH) $(MCS) $(MCS_FLAGS) -o $(LIBRARY) $(LIB_FLAGS) @.response
25
26 install: all
27         mkdir -p $(prefix)/lib/
28         $(INSTALL) -m 644 $(LIBRARY) $(prefix)/lib/
29