Created
March 17, 2014 14:15
-
-
Save fastjack/9599945 to your computer and use it in GitHub Desktop.
Example of adding CFLAGS to pebble project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file is the default set of rules to compile a Pebble project. | |
# | |
# Feel free to customize this to your needs. | |
# | |
top = '.' | |
out = 'build' | |
def options(ctx): | |
ctx.load('pebble_sdk') | |
def configure(ctx): | |
ctx.load('pebble_sdk') | |
def build(ctx): | |
ctx.load('pebble_sdk') | |
ctx.env.CFLAGS.append('-Wpointer-arith') | |
ctx.env.CFLAGS.append('-Wformat-nonliteral') | |
ctx.env.CFLAGS.append('-Winit-self') | |
ctx.env.CFLAGS.append('-Werror=unused-variable') # override defaults | |
ctx.env.CFLAGS.append('-Werror=unused-parameter') # override defaults | |
ctx.env.CFLAGS.append('-Werror=unused-function') # override defaults | |
ctx.env.CFLAGS.append('-fno-exceptions') | |
ctx.env.CFLAGS.append('-fvisibility=hidden') | |
ctx.env.CFLAGS.append('-Wl,-O1') | |
ctx.env.CFLAGS.append('-Wl,--discard-all') | |
ctx.env.CFLAGS.append('-Wl,--no-undefined') | |
ctx.env.CFLAGS.append('-Wl,--build-id=sha1') | |
ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'), | |
target='pebble-app.elf') | |
ctx.pbl_bundle(elf='pebble-app.elf', | |
js=ctx.path.ant_glob('src/js/**/*.js')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment