1 # Build script for Linux 2 # 3 # Usage: 4 # $ cd ots/test/ 5 # $ scons -c # clean 6 # $ scons # build 7 # 8 9 # Since the validator-checker tool might handle malicious font files, all hardening options for recent g++/ld are enabled just in case. 10 # See http://wiki.debian.org/Hardening for details. 11 env = Environment(CCFLAGS = ['-O2', '-I../include', '-I../src', '-I/usr/include/freetype2', '-ggdb', '-Wall', '-W', '-Wno-unused-parameter', '-fno-strict-aliasing', '-fPIE', '-fstack-protector', '-D_FORTIFY_SOURCE=2', '-DOTS_DEBUG'], LINKFLAGS = ['-ggdb', '-Wl,-z,relro', '-Wl,-z,now', '-pie', '-lz']) 12 # TODO(yusukes): better to use pkg-config freetype2 --cflags 13 14 env.Library('../src/libots.a', 15 ['../src/cff.cc', 16 '../src/cff_type2_charstring.cc', 17 '../src/cmap.cc', 18 '../src/cvt.cc', 19 '../src/fpgm.cc', 20 '../src/gasp.cc', 21 '../src/gdef.cc', 22 '../src/glyf.cc', 23 '../src/gpos.cc', 24 '../src/gsub.cc', 25 '../src/hdmx.cc', 26 '../src/head.cc', 27 '../src/hhea.cc', 28 '../src/hmtx.cc', 29 '../src/kern.cc', 30 '../src/layout.cc', 31 '../src/loca.cc', 32 '../src/ltsh.cc', 33 '../src/maxp.cc', 34 '../src/metrics.cc', 35 '../src/name.cc', 36 '../src/os2.cc', 37 '../src/ots.cc', 38 '../src/post.cc', 39 '../src/prep.cc', 40 '../src/vdmx.cc', 41 '../src/vhea.cc', 42 '../src/vmtx.cc', 43 '../src/vorg.cc' 44 ]) 45 46 env.Program('../test/cff_type2_charstring_test.cc', LIBS = ['ots', 'gtest_main'], LIBPATH = '../src') 47 env.Program('../test/layout_common_table_test.cc', LIBS = ['ots', 'gtest_main'], LIBPATH = '../src') 48 env.Program('../test/table_dependencies_test.cc', LIBS = ['ots', 'gtest_main'], LIBPATH = '../src') 49 env.Program('../test/ot-sanitise.cc', LIBS = ['ots'], LIBPATH='../src') 50 env.Program('../test/idempotent.cc', LIBS = ['ots', 'freetype', 'z', 'm'], LIBPATH='../src') 51 env.Program('../test/perf.cc', LIBS = ['ots'], LIBPATH='../src') 52 53 # TODO(yusukes): better to use pkg-config freetype2 --libs 54 env.Program('../test/side-by-side.cc', LIBS = ['ots', 'freetype', 'z', 'm'], LIBPATH = '../src') 55 env.Program('../test/validator-checker.cc', LIBS = ['ots', 'freetype', 'z', 'm'], LIBPATH = '../src') 56