mirror of
https://github.com/google/pebble.git
synced 2025-07-22 07:14:53 -04:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
74
tools/pdc2png/wscript
Normal file
74
tools/pdc2png/wscript
Normal file
|
@ -0,0 +1,74 @@
|
|||
import os
|
||||
import sh
|
||||
from waflib import Logs
|
||||
|
||||
def build(bld):
|
||||
pdc2png_env = bld.all_envs['32bit'].derive()
|
||||
output = bld.path.get_bld().parent.parent.make_node('pdc2png')
|
||||
|
||||
sources = ["../../src/fw/applib/vendor/uPNG/upng.c",
|
||||
"../../src/fw/applib/vendor/tinflate/tinflate.c",
|
||||
"../../src/fw/applib/graphics/8_bit/bitblt_private.c",
|
||||
"../../src/fw/applib/graphics/gpath.c",
|
||||
"../../src/fw/applib/graphics/gbitmap.c",
|
||||
"../../src/fw/applib/graphics/gbitmap_png.c",
|
||||
"../../src/fw/applib/graphics/gcolor_definitions.c",
|
||||
"../../src/fw/applib/graphics/gtypes.c",
|
||||
"../../src/fw/applib/graphics/graphics.c",
|
||||
"../../src/fw/applib/graphics/graphics_line.c",
|
||||
"../../src/fw/applib/graphics/graphics_circle.c",
|
||||
"../../src/fw/applib/graphics/graphics_private.c",
|
||||
"../../src/fw/applib/graphics/graphics_private_raw.c",
|
||||
"../../src/fw/applib/graphics/bitblt.c",
|
||||
"../../src/fw/applib/graphics/8_bit/framebuffer.c",
|
||||
"../../src/fw/applib/graphics/framebuffer.c",
|
||||
"../../src/fw/applib/graphics/gdraw_command.c",
|
||||
"../../src/fw/applib/graphics/gdraw_command_list.c",
|
||||
"../../src/fw/applib/graphics/gdraw_command_image.c",
|
||||
"../../src/fw/applib/graphics/gdraw_command_frame.c",
|
||||
"../../src/fw/applib/graphics/gdraw_command_sequence.c"]
|
||||
|
||||
sources = [bld.path.find_node(s) for s in sources]
|
||||
sources.extend(bld.path.ant_glob('src/*.c'))
|
||||
|
||||
includes = ["../../tests/stubs",
|
||||
"../../tests/fw/graphics",
|
||||
"../../src/fw/applib/vendor/uPNG",
|
||||
"../../src/fw/applib/vendor/tinflate",
|
||||
"../../tests/overrides/default/",
|
||||
"../../src/include",
|
||||
"../../src/fw",
|
||||
"../../src/libutil/includes",
|
||||
"../../src/fw/util/time",
|
||||
"../../src/fw/vendor/FreeRTOS/Source/include",
|
||||
"../../src/fw/vendor/FreeRTOS/Source/portable/GCC/ARM_CM3_PEBBLE"]
|
||||
|
||||
includes = [bld.path.find_node(i).abspath() for i in includes]
|
||||
|
||||
# We are overriding the gcc toolchain include/time.h with our own
|
||||
pdc2png_env.CFLAGS.append('-D_TIME_H_') # just to check/force our version of <time.h>
|
||||
pdc2png_env.CFLAGS.append('-I' + bld.path.abspath() + '/../src/fw/util/time')
|
||||
pdc2png_env.CFLAGS.append('-I' + bld.path.abspath() + '/src/include')
|
||||
|
||||
# time_t is defined in sys/types in newlib, and time.h on recent Linux
|
||||
# so just force the defined type for testing time
|
||||
pdc2png_env.CFLAGS.append('-Dtime_t=__SYSCALL_SLONG_TYPE')
|
||||
|
||||
pbi2png_script = bld.path.find_node('../pbi2png.py')
|
||||
pbi2png_copy = bld.path.get_bld().parent.parent.make_node('pbi2png.py')
|
||||
bld(rule="cp ${SRC} ${TGT}", source=pbi2png_script, target=pbi2png_copy)
|
||||
|
||||
bld.program(source=sources,
|
||||
target=output,
|
||||
includes=includes,
|
||||
defines=['UNITTEST', 'SCREEN_COLOR_DEPTH_BITS=8',
|
||||
# TODO: PBL-21014 Support arbitrary display sizes
|
||||
'DISP_COLS=144', 'DISP_ROWS=168',
|
||||
'DISPLAY_FRAMEBUFFER_BYTES=%d' % (144 * 168),
|
||||
'PBL_COLOR', 'PBL_RECT', 'PLATFORM_SNOWY=1',
|
||||
'PBI2PNG_EXE="pbi2png.py"'],
|
||||
use=['libutil-32bit', 'libos_includes'],
|
||||
env=pdc2png_env)
|
||||
|
||||
|
||||
# vim:filetype=python
|
Loading…
Add table
Add a link
Reference in a new issue