| edisonn@google.com | 63ce82f | 2013-08-16 16:13:44 +0000 | [diff] [blame] | 1 | # GYP file to build pdfviewer. |
| 2 | # |
| 3 | # To build on Linux: |
| 4 | # ./gyp_skia pdfviewer.gyp && make pdfviewer |
| 5 | # |
| 6 | { |
| 7 | # TODO(edisonn): Hack! on mack, SHARED_INTERMEDIATE_DIR can't be reliable used in a sources context |
| 8 | 'conditions' : [ |
| 9 | [ 'skia_os != "mac"', { |
| 10 | 'variables': { |
| 11 | 'GENERATE_DIR%' : '<(SHARED_INTERMEDIATE_DIR)', |
| 12 | }, |
| 13 | }, |
| 14 | ], |
| 15 | [ 'skia_os == "mac"', { |
| 16 | 'variables': { |
| 17 | 'GENERATE_DIR%' : '../src/tmp_autogen', |
| 18 | }, |
| 19 | }, |
| 20 | ], |
| 21 | ], |
| 22 | 'targets': [ |
| 23 | { |
| 24 | 'target_name': 'pdfviewer_lib', |
| 25 | 'type': 'static_library', |
| 26 | 'sources': [ |
| 27 | '../experimental/PdfViewer/SkPdfGraphicsState.cpp', |
| 28 | '../experimental/PdfViewer/SkPdfFont.cpp', |
| 29 | '../experimental/PdfViewer/SkPdfRenderer.cpp', |
| 30 | '../experimental/PdfViewer/SkPdfUtils.cpp', |
| 31 | #'../experimental/PdfViewer/SkPdfNYI.cpp', |
| 32 | '../experimental/PdfViewer/SkTrackDevice.cpp', |
| 33 | '../experimental/PdfViewer/SkTracker.cpp', |
| 34 | '../experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp', |
| 35 | '../experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp', |
| 36 | '../experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp', |
| 37 | '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', |
| 38 | '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', |
| 39 | ], |
| 40 | 'actions': [ |
| 41 | { |
| 42 | 'action_name': 'spec2def', |
| 43 | 'inputs': [ |
| 44 | '../experimental/PdfViewer/spec2def.py', |
| 45 | '../experimental/PdfViewer/PdfReference-okular-1.txt', |
| 46 | ], |
| 47 | 'outputs': [ |
| 48 | '<(GENERATE_DIR)/pdfspec_autogen.py', |
| 49 | ], |
| 50 | 'action': ['python', '../experimental/PdfViewer/spec2def.py', '../experimental/PdfViewer/PdfReference-okular-1.txt', '<(GENERATE_DIR)/pdfspec_autogen.py'], |
| 51 | }, |
| 52 | { |
| 53 | 'action_name': 'copy_files1', |
| 54 | 'inputs' : ['../experimental/PdfViewer/datatypes.py'], |
| 55 | 'outputs': [ |
| 56 | '<(GENERATE_DIR)/datatypes.py', |
| 57 | ], |
| 58 | 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GENERATE_DIR)', '../experimental/PdfViewer/datatypes.py'], |
| 59 | }, |
| 60 | { |
| 61 | 'action_name': 'copy_files2', |
| 62 | |
| 63 | 'inputs' : ['../experimental/PdfViewer/generate_code.py'], |
| 64 | 'outputs': [ |
| 65 | '<(GENERATE_DIR)/generate_code.py', |
| 66 | ], |
| 67 | 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GENERATE_DIR)', '../experimental/PdfViewer/generate_code.py'], |
| 68 | }, |
| 69 | { |
| 70 | 'action_name': 'generate_code', |
| 71 | 'inputs': [ |
| 72 | '<(GENERATE_DIR)/datatypes.py', |
| 73 | '<(GENERATE_DIR)/generate_code.py', |
| 74 | '<(GENERATE_DIR)/pdfspec_autogen.py', |
| 75 | ], |
| 76 | 'outputs': [ |
| 77 | '<(GENERATE_DIR)/native/autogen/SkPdfEnums_autogen.h', |
| 78 | '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.h', |
| 79 | '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.h', |
| 80 | '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', |
| 81 | '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', |
| 82 | # TODO(edisonn): ok, there are many more files here, which we should list but since |
| 83 | # any change in the above should trigger a change here, we should be fine normally |
| 84 | ], |
| 85 | 'action': ['python', '<(GENERATE_DIR)/generate_code.py', '<(GENERATE_DIR)'], |
| 86 | }, |
| 87 | ], |
| 88 | 'include_dirs': [ |
| 89 | '../experimental/PdfViewer', |
| 90 | '../experimental/PdfViewer/pdfparser', |
| 91 | '../experimental/PdfViewer/pdfparser/native', |
| 92 | '<(GENERATE_DIR)/native/autogen', |
| 93 | ], |
| 94 | 'dependencies': [ |
| 95 | 'skia_lib.gyp:skia_lib', |
| 96 | 'zlib.gyp:zlib', |
| 97 | ], |
| 98 | }, |
| 99 | ], |
| 100 | } |
| 101 | |
| 102 | # Local Variables: |
| 103 | # tab-width:2 |
| 104 | # indent-tabs-mode:nil |
| 105 | # End: |
| 106 | # vim: set expandtab tabstop=2 shiftwidth=2: |