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
)
17 CSC?
=gmcs
-langversion
:linq
22 CSFLAGS
=/warn
:4 /debug
23 #CSFLAGS += /warnaserror
25 TESTRUNNER
=$(WVDOTNET
)/wvtestrunner.pl
27 # Rules for generating autodependencies on header files
28 $(patsubst %.cs.E
,%.d
,$(filter %.cs.E
,$(FILES
))): %.d
: %.cs
29 @echo Generating dependency file
$@ for
$<
30 @set
-e
; set
-o pipefail
; rm -f
$@
; (\
31 ($(CSCPP
) -M
-MM
-MQ
'$@' $(CPPFLAGS
) $< && echo Makefile
) \
32 | paste
-s
-d
' ' - && \
33 $(CSCPP
) -M
-MM
-MQ
'$<'.E
$(CPPFLAGS
) $< \
35 ||
(rm -f
$@
&& echo
"Error generating dependency file." && exit
1)
37 include $(patsubst %.cs.E
,%.d
,$(filter %.cs.E
,$(FILES
)))
39 # Rule for actually preprocessing source files with headers
42 set
-o pipefail
; $(CSCPP
) $(CPPFLAGS
) -C
-dI
$< \
44 | sed
-e
's,^#include,//#include,' \
45 | grep
-v
'^# [0-9]' \
46 >$@ ||
(rm -f
$@
&& exit
1)
50 @for d in
$(filter ..
/%.dll
,$^
); do \
51 rm -f
$$(basename $$d); \
52 $(SYMLINK
) -v
$$d .
; \
54 $(CSC
) $(CSFLAGS
) /target
:$1 /out
:$@ \
56 $(filter %.cs.E
%.cs
,$^
) \
57 $(patsubst %.dll
,/r
:%.dll
,$(filter %.dll
,$^
))
61 %.dll
: assemblyinfo.cs
62 $(call csbuild
,library
)
64 # This must come before the %.cs rule, since %.cs.E files are better.
77 $(TESTRUNNER
) mono
--debug .
/$^
81 rm -f
*~
*.E
*.d
*.exe
*.dll
*.mdb
*.pdb