Files
yoga/Makefile

34 lines
1.1 KiB
Makefile
Raw Normal View History

# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
2014-09-11 09:23:30 -07:00
FILES=src/__tests__/Layout-test.c src/Layout.c src/Layout-test-utils.c
2014-09-18 15:15:21 -07:00
all: c c_test java java_test
2014-09-18 15:15:21 -07:00
c: transpile_all
2014-09-18 15:15:21 -07:00
c_test: c
2014-09-26 18:19:32 -07:00
@gcc -std=c99 -Werror -Wno-padded $(FILES) -lm && ./a.out
2014-09-11 09:23:30 -07:00
@rm a.out
2014-09-18 15:15:21 -07:00
java: transpile_all src/java
@if [ ! -f lib/junit4.jar ]; then mkdir lib/; wget -O lib/junit4.jar http://search.maven.org/remotecontent?filepath=junit/junit/4.10/junit-4.10.jar; fi
2014-09-18 15:15:21 -07:00
@javac -cp ./lib/junit4.jar -sourcepath ./src/java/src:./src/java/tests src/java/tests/com/facebook/csslayout/*.java
java_test: java
@java -cp ./src/java/src:./src/java/tests:./lib/junit4.jar org.junit.runner.JUnitCore \
com.facebook.csslayout.LayoutEngineTest \
com.facebook.csslayout.LayoutCachingTest \
com.facebook.csslayout.CSSNodeTest
2014-09-18 15:15:21 -07:00
transpile_all: ./src/transpile.js
@node ./src/transpile.js
2014-09-11 09:23:30 -07:00
debug:
2014-09-26 18:19:32 -07:00
@gcc -ggdb $(FILES) -lm && lldb ./a.out
@rm a.out