File: Makefile

package info (click to toggle)
clearsilver 0.10.5-1.4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,272 kB
  • ctags: 3,138
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 603; perl: 120; lisp: 34; sql: 21
file content (64 lines) | stat: -rw-r--r-- 1,389 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

# default values....

CSHARP_CC=$(CSHARP_PATH)/bin/mcs
MONO_JIT=$(CSHARP_PATH)/bin/mono

# common build environment

ifeq ($(NEOTONIC_ROOT),)
NEOTONIC_ROOT = ..
endif

include $(NEOTONIC_ROOT)/rules.mk

# our targets

TARGETS = clearsilver.dll cstest.exe csperftest.exe testcs

all: $(TARGETS)

clearsilver.dll: CS.cs
	$(CSHARP_CC) -target:library -unsafe CS.cs -out:clearsilver.dll

cstest.exe: clearsilver.dll ../dso/libneo.so cstest.cs
	$(CSHARP_CC) -r:clearsilver.dll -unsafe cstest.cs 

csperftest.exe: clearsilver.dll ../dso/libneo.so csperftest.cs
	$(CSHARP_CC) -r:clearsilver.dll -unsafe csperftest.cs

perf: csperftest.exe
	export LD_LIBRARY_PATH=../dso; \
	$(MONO_JIT) csperftest.exe 
	

testcs: cstest.exe
	@echo "Running csharp test"
	@failed=0; \
	rm -f cstest.out; \
	export LD_LIBRARY_PATH=../dso; \
	$(MONO_JIT) cstest.exe > cstest.out; \
	diff cstest.out cstest.gold > /dev/null; \
	return_code=$$?; \
	if [ $$return_code -ne 0 ]; then \
	  diff cstest.out cstest.gold > cstest.err; \
	  echo "Failed csharp test: cstest.cs"; \
	  echo "    See cstest.out and cstest.err"; \
	  failed=1; \
	fi; \
	if [ $$failed -eq 1 ]; then \
	  exit 1; \
	fi;
	@echo "Passed csharp test"

gold: cstest.exe
	export LD_LIBRARY_PATH=../dso; \
	$(MONO_JIT) cstest.exe > cstest.gold;
	@echo "Generated gold files"


clean:
	rm -f core.*

distclean:
	rm -f $(TARGETS) core.* Makefile.depend