Blame view

build4/epsilon-master/build/targets.blackbox.mak 1.38 KB
6663b6c9   adorian   projet complet av...
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
  # Compare
  
  products += $(wildcard ion/src/blackbox/library_*.o)
  
  ion/src/blackbox/library_%.o: SFLAGS += -D EPSILON_LIB_PREFIX=$(*F)
  ion/src/blackbox/library_%.o: ion/src/blackbox/library.cpp
  	@echo "CXX     $@"
  	$(Q) $(CXX) $(SFLAGS) $(CXXFLAGS) -c $< -o $@
  
  libepsilon_objs = $(filter-out $(addprefix ion/src/blackbox/,boot.o events.o),$(objs))
  
  libepsilon_%.o: LDFLAGS += -exported_symbols_list ion/src/blackbox/lib_export_list.txt
  libepsilon_%.o: $(libepsilon_objs) $(app_objs) $(app_image_objs) ion/src/blackbox/library_%.o
  	@echo "LD      $@"
  	$(Q) $(LD) $^ $(LDFLAGS) -r -s -o $@
  
  compare: ion/src/blackbox/compare.o libepsilon_first.o libepsilon_second.o
  	@echo "LD      $@"
  	$(Q) $(LD) $^ $(LDFLAGS) -L. -o $@
  
  # Integration tests
  
  .PHONY: tests/%.run
  tests/%.run: tests/%.esc epsilon.$(EXE)
  	@echo "RUN     $<"
  	@./epsilon.$(EXE) --logAfter 0 < $< > /dev/null
  
  .PHONY: tests/%.render
  tests/%.render: tests/%.esc epsilon.$(EXE)
  	@echo "RENDER  $<"
  	@rm -rf tests/$(*F)
  	@mkdir -p tests/$(*F)
  	@rm -f event*.png
  	@./epsilon.$(EXE) --logAfter 0 < $< > /dev/null
  	@mv event*.png tests/$(*F)
  
  scenarios = $(wildcard tests/*.esc)
  .PHONY: integration_tests
  integration_tests: $(scenarios:.esc=.run)
  
  # Fuzzing
  .PHONY: epsilon_fuzz
  ifeq ($(TOOLCHAIN),afl)
  epsilon_fuzz: epsilon.$(EXE)
  	@echo "FUZZ    $<"
  	@afl-fuzz -i tests -o afl ./epsilon.$(EXE)
  else
  epsilon_fuzz:
  	@echo "Fuzzing requires TOOLCHAIN=afl"
  endif