5 # cc -E tries to guess by extension what to do with the file.
6 # And it does other weird things. cpp seems to Just Work(tm), so use that for
10 # Cygwin supports symlinks, but they aren't actually useful outside cygwin,
11 # so let's just copy instead. We also use Microsoft's .net compiler instead
13 ifeq ($(OS
),Windows_NT
)
18 CSC?
=gmcs
-langversion
:linq
24 CSFLAGS
=/warn
:4 /debug
25 #CSFLAGS += /warnaserror
27 TESTRUNNER
=$(WVDOTNET
)/wvtestrunner.pl
29 # Rules for generating autodependencies on header files
30 $(patsubst %.cs.E
,%.d
,$(filter %.cs.E
,$(FILES
))): %.d
: %.cs
31 @echo Generating dependency file
$@ for
$<
32 @set
-e
; set
-o pipefail
; rm -f
$@
; (\
33 ($(CSCPP
) -M
-MM
-MQ
'$@' $(CPPFLAGS
) $< && echo Makefile
) \
34 | paste
-s
-d
' ' - && \
35 $(CSCPP
) -M
-MM
-MQ
'$<'.E
$(CPPFLAGS
) $< \
37 ||
(rm -f
$@
&& echo
"Error generating dependency file." && exit
1)
39 include $(patsubst %.cs.E
,%.d
,$(filter %.cs.E
,$(FILES
)))
41 # Rule for actually preprocessing source files with headers
44 set
-o pipefail
; $(CSCPP
) $(CPPFLAGS
) -C
-dI
$< \
46 | sed
-e
's,^#include,//#include,' \
47 | grep
-v
'^# [0-9]' \
48 >$@ ||
(rm -f
$@
&& exit
1)
52 @for d in
$(filter ..
/%.dll
,$^
); do \
53 rm -f
$$(basename $$d); \
54 $(SYMLINK
) -v
$$d .
; \
56 $(CSC
) $(CSFLAGS
) /target
:$1 /out
:$@ \
58 $(filter %.cs.E
%.cs
,$^
) \
59 $(patsubst %.dll
,/r
:%.dll
,$(filter %.dll
,$^
))
63 %.dll
: assemblyinfo.cs
64 $(call csbuild
,library
)
66 # This must come before the %.cs rule, since %.cs.E files are better.
79 $(TESTRUNNER
) $(MONORUN
) .
/$^
83 rm -f
*~
*.E
*.d
*.exe
*.dll
*.mdb
*.pdb