Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
| 7 | |
| 8 | FIXEDPOINTLIB := $(BUILDDIR)/lib/libfixedpoint.a |
| 9 | FIXEDPOINTLIB_DIR := $(ROOTDIR)/lib/fixedpoint |
| 10 | FIXEDPOINTLIB_SRC := $(FIXEDPOINTLIB_DIR)/fixedpoint.c |
| 11 | FIXEDPOINTLIB_OBJ := $(call c2obj, $(FIXEDPOINTLIB_SRC)) |
| 12 | |
| 13 | INCLUDES += -I$(FIXEDPOINTLIB_DIR) |
| 14 | OTHER_SRC += $(FIXEDPOINTLIB_SRC) |
| 15 | |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 16 | CORE_LIBS += $(FIXEDPOINTLIB) |
Dominik Riebeling | d566fd5 | 2013-05-03 13:02:56 +0200 | [diff] [blame] | 17 | CORE_GCSECTIONS := yes |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 18 | |
Michael Sevakis | 5314fb2 | 2013-04-25 18:33:08 -0400 | [diff] [blame] | 19 | FIXEDPOINTLIB_FLAGS := $(CFLAGS) $(SHARED_CFLAGS) |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 20 | |
| 21 | # Do not use '-ffunction-sections' and '-fdata-sections' when compiling sdl-sim |
| 22 | ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim) |
| 23 | FIXEDPOINTLIB_FLAGS += -ffunction-sections -fdata-sections |
| 24 | endif |
| 25 | |
| 26 | $(FIXEDPOINTLIB_OBJ): $(FIXEDPOINTLIB_SRC) |
| 27 | $(SILENT)mkdir -p $(dir $@) |
| 28 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ |
| 29 | $(FIXEDPOINTLIB_FLAGS) -c $< -o $@ |
| 30 | |
| 31 | $(FIXEDPOINTLIB): $(FIXEDPOINTLIB_OBJ) |
| 32 | $(SILENT)$(shell rm -f $@) |
| 33 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |