build.ninja (842B)
1 BUILD = b 2 COCOBUILD = $BUILD/coco_gen 3 CXX = clang++ 4 CXXFLAGS = $$CXXFLAGS -fcolor-diagnostics -D_MSC_VER=0 -I $COCOBUILD -I . 5 COCO = cococpp 6 COCODIR = /usr/share/coco-cpp/ 7 COCOFLAGS = -frames $COCODIR -o $COCOBUILD 8 LD = clang++ 9 LDFLAGS = $$CXXFLAGS 10 11 rule cxx 12 depfile = $out.d 13 deps = gcc 14 command = $CXX $CXXFLAGS -MD -MF $out.d -c $in -o $out 15 16 rule coco 17 command = $COCO $COCOFLAGS $in 18 19 rule link 20 command = $LD $LDFLAGS $in -o $out 21 22 build $COCOBUILD/Parser.cpp $COCOBUILD/Scanner.cpp $COCOBUILD/Parser.h $COCOBUILD/Scanner.h: coco cubescript.atg | $COCODIR/Parser.frame $COCODIR/Scanner.frame 23 24 build $BUILD/main.cpp.o: cxx main.cpp 25 build $BUILD/Parser.cpp.o: cxx $COCOBUILD/Parser.cpp 26 build $BUILD/Scanner.cpp.o: cxx $COCOBUILD/Scanner.cpp 27 28 build $BUILD/cs2lint: link $BUILD/main.cpp.o $BUILD/Parser.cpp.o $BUILD/Scanner.cpp.o