Cleaner build process

Change-Id: I6ecc7b77437397859f8ebb79ace48aaa9c1c2047
This commit is contained in:
Romain Goyet
2017-04-19 22:21:46 +02:00
parent e16db9cc9d
commit 4d6eddb411
3 changed files with 13 additions and 8 deletions

4
.gitignore vendored
View File

@@ -27,5 +27,9 @@ kandinsky/src/font.h
apps/picview/image.raw
apps/picview/image.c
# No AST file
*.ast
*.ast.json
# Quiz output
quiz/src/symbols.c

View File

@@ -1,8 +1,9 @@
products += build/struct_layout/apps_container_layout.json
build/struct_layout/apps_container_layout.json:
@echo "AST $@"
@clang -cc1 -x c++ -v -fdump-record-layouts apps/main.cpp -Iescher/include -Ikandinsky/include -Iion/include -Ipoincare/include -std=c++11 -emit-llvm-only -o /dev/null > foo.txt
@echo "JSON $@"
@cat foo.txt | ruby build/struct_layout/ast_to_json.rb AppsContainer > $@
@rm foo.txt
products += apps/main.ast build/struct_layout/data.json
%.ast: %.cpp %.o
@echo "AST $@"
@$(CXX) -fno-color-diagnostics -Xclang -fdump-record-layouts $(SFLAGS) $(CXXFLAGS) -MF /dev/null -c $< -o /dev/null > $@
%.ast.json: %.ast
@echo "JSON $@"
@cat $< | ruby build/struct_layout/ast_to_json.rb AppsContainer > $@

View File

@@ -104,7 +104,7 @@ grandparent.append("text")
.attr("y", 6 - margin.top)
.attr("dy", ".75em");
d3.json("apps_container_layout.json", function(root) {
d3.json("../apps/main.ast.json", function(root) {
initialize(root);
accumulate(root);
layout(root);