Make fixepoint.c as a shared library (libfixedpoint.a).

Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d
Reviewed-on: http://gerrit.rockbox.org/456
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
This commit is contained in:
Michael Sevakis 2013-04-16 17:47:58 -04:00
parent 8829e909b4
commit 95e23defb0
28 changed files with 91 additions and 101 deletions

View file

@ -17,6 +17,7 @@ INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files
CORE_LDOPTS = $(GLOBAL_LDOPTS) # linker ops specifically for core build
TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
$(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \
@ -90,10 +91,15 @@ ifndef APP_TYPE
endif
endif
ifeq (,$(findstring bootloader,$(APPSDIR)))
ifeq (,$(findstring checkwps,$(APP_TYPE)))
include $(ROOTDIR)/lib/fixedpoint/fixedpoint.make
endif
endif
ifneq (,$(findstring bootloader,$(APPSDIR)))
include $(APPSDIR)/bootloader.make
else ifneq (,$(findstring bootbox,$(APPSDIR)))
BOOTBOXLDOPTS = -Wl,--gc-sections
include $(APPSDIR)/bootbox.make
else ifneq (,$(findstring checkwps,$(APP_TYPE)))
include $(APPSDIR)/checkwps.make
@ -104,10 +110,10 @@ else ifneq (,$(findstring warble,$(APP_TYPE)))
include $(ROOTDIR)/lib/rbcodec/test/warble.make
include $(ROOTDIR)/lib/tlsf/libtlsf.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
else
else # core
include $(APPSDIR)/apps.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
include $(APPSDIR)/lang/lang.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
ifdef ENABLEDPLUGINS
include $(APPSDIR)/plugins/bitmaps/pluginbitmaps.make
@ -132,6 +138,14 @@ else
endif # bootloader
# One or more subdir makefiles requested --gc-sections?
ifdef CORE_GCSECTIONS
# Do not use '--gc-sections' when compiling sdl-sim
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
CORE_LDOPTS += -Wl,--gc-sections
endif
endif # CORE_GCSECTIONS
OBJ := $(SRC:.c=.o)
OBJ := $(OBJ:.S=.o)
OBJ += $(BMP:.bmp=.o)
@ -205,16 +219,16 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LI
-L$(BUILDDIR)/firmware -lfirmware \
-L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
-lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \
-T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map
-lgcc -T$(LINKRAM) \
$(CORE_LDOPTS) -Wl,-Map,$(BUILDDIR)/rockbox.map
$(BUILDDIR)/rombox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKROM)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
-L$(BUILDDIR)/firmware -lfirmware \
-L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
-lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \
-T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
-lgcc -T$(LINKROM) \
$(CORE_LDOPTS) -Wl,-Map,$(BUILDDIR)/rombox.map
$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
$(call PRINTS,OC $(@F))$(call objcopy,$<,$@)