ifneq (,$(wildcard *.sbd))
include $(wildcard *.sbd)
endif
SDETOP ?= ../..

PROG		=hello
SRCS		=hello.c

CFLAGS += -Os -g -ffunction-sections
LDFLAGS += -Wl,--gc-sections

ifdef MINSIZE
# Special space savers options which affect the crt0 startup code.
# They reduce the functionality of the run-time environment, so make
# sure that you don't need the feature which you're disabling.  Code
# size savings are given for MSIM16L board support.

# No execution of program exit code, minimal exception stacktrace.
# saves ~ 2590 bytes
CRT0FLAGS += -DMINKIT

# Minimal exception handling and diagnostics
# saves ~ 3150 bytes, implies most of MINKIT
CRT0FLAGS += -DSMALLXCPT

# No C++ static constructor/destructor support.
# saves ~ 230 bytes
LDFLAGS += -nostartfiles
CRT0FLAGS += -DNOCTORDTOR

# No SDE kit optional "feature" initialization.
# This is rarely a good idea to omit.
# saves ~ 170 bytes
CRT0FLAGS += -DNOFEATUREINIT

endif

include $(SDETOP)/examples/make.mk
