diff options
Diffstat (limited to 'media/libstagefright/codecs/aacenc/Tools/eclair.mk')
-rw-r--r-- | media/libstagefright/codecs/aacenc/Tools/eclair.mk | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/aacenc/Tools/eclair.mk b/media/libstagefright/codecs/aacenc/Tools/eclair.mk new file mode 100644 index 0000000..1688361 --- /dev/null +++ b/media/libstagefright/codecs/aacenc/Tools/eclair.mk @@ -0,0 +1,172 @@ +#/* +# ** Copyright 2003-2010, VisualOn, Inc. +# ** +# ** Licensed under the Apache License, Version 2.0 (the "License"); +# ** you may not use this file except in compliance with the License. +# ** You may obtain a copy of the License at +# ** +# ** http://www.apache.org/licenses/LICENSE-2.0 +# ** +# ** Unless required by applicable law or agreed to in writing, software +# ** distributed under the License is distributed on an "AS IS" BASIS, +# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# ** See the License for the specific language governing permissions and +# ** limitations under the License. +# */ + +# special macro definitions for building +VOPREDEF=-DLINUX -D_LINUX + +VOPRJ ?= +VONJ ?= eclair +VOTT ?= v6 +# control the version to release out +# available: eva(evaluation), rel(release) +VOVER= +ifeq ($(VOVER), eva) +VOPREDEF+=-D__VOVER_EVA__ +endif + +# for debug or not: yes for debug, any other for release +VODBG?=ye + +# for detecting memory leak +VODML= +ifeq ($(VODML), yes) +VOPREDEF+=-DDMEMLEAK +endif + +VOPREDEF+=-D__VOTT_ARM__ -D__VONJ_ECLAIR__ +TCROOTPATH:=/opt/eclair +GCCVER:=4.4.0 +TCPATH:=$(TCROOTPATH)/prebuilt/linux-x86/toolchain/arm-eabi-$(GCCVER) +CCTPRE:=$(TCPATH)/bin/arm-eabi- +AS:=$(CCTPRE)as +AR:=$(CCTPRE)ar +NM:=$(CCTPRE)nm +CC:=$(CCTPRE)gcc +GG:=$(CCTPRE)g++ +LD:=$(CCTPRE)ld +SIZE:=$(CCTPRE)size +STRIP:=$(CCTPRE)strip +RANLIB:=$(CCTPRE)ranlib +OBJCOPY:=$(CCTPRE)objcopy +OBJDUMP:=$(CCTPRE)objdump +READELF:=$(CCTPRE)readelf +STRINGS:=$(CCTPRE)strings + +# target product dependcy +# available: dream, generic +VOTP:=sapphire-open +CCTLIB:=$(TCROOTPATH)/out/target/product/$(VOTP)/obj/lib +CCTINC:=-I$(TCROOTPATH)/system/core/include \ + -I$(TCROOTPATH)/hardware/libhardware/include \ + -I$(TCROOTPATH)/hardware/ril/include \ + -I$(TCROOTPATH)/hardware/libhardware_legacy/include \ + -I$(TCROOTPATH)/dalvik/libnativehelper/include \ + -I$(TCROOTPATH)/dalvik/libnativehelper/include/nativehelper \ + -I$(TCROOTPATH)/frameworks/base/include \ + -I$(TCROOTPATH)/frameworks/base/core/jni \ + -I$(TCROOTPATH)/frameworks/base/libs/audioflinger \ + -I$(TCROOTPATH)/external/skia/include \ + -I$(TCROOTPATH)/out/target/product/$(VOTP)/obj/include \ + -I$(TCROOTPATH)/bionic/libc/arch-arm/include \ + -I$(TCROOTPATH)/bionic/libc/include \ + -I$(TCROOTPATH)/bionic/libstdc++/include \ + -I$(TCROOTPATH)/bionic/libc/kernel/common \ + -I$(TCROOTPATH)/bionic/libc/kernel/arch-arm \ + -I$(TCROOTPATH)/bionic/libm/include \ + -I$(TCROOTPATH)/bionic/libm/include/arm \ + -I$(TCROOTPATH)/bionic/libthread_db/include \ + -I$(TCROOTPATH)/bionic/libm/arm \ + -I$(TCROOTPATH)/bionic/libm \ + -I$(TCROOTPATH)/frameworks/base/include/android_runtime + #-I$(TCROOTPATH)/out/target/product/$(VOTP)/obj/SHARED_LIBRARIES/libm_intermediates + +CCTCFLAGS:=-msoft-float -mthumb-interwork -fno-exceptions -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -fmessage-length=0 -finline-functions -finline-limit=600 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fstrict-aliasing -funswitch-loops +#-fwide-exec-charset=charset=UTF-32 + +# for target exe +TELDFLAGS:=-nostdlib -Bdynamic -Wl,-T,$(TCROOTPATH)/build/core/armelf.x -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,--no-undefined -Wl,-rpath-link=$(CCTLIB) -L$(CCTLIB) + +VOTEDEPS:=$(CCTLIB)/crtbegin_dynamic.o $(CCTLIB)/crtend_android.o $(TCPATH)/lib/gcc/arm-eabi/$(GCCVER)/interwork/libgcc.a -lc -lm + +# for target lib +TLLDFLAGS:=-nostdlib -Wl,-T,$(TCROOTPATH)/build/core/armelf.xsc -Wl,--gc-sections -Wl,-shared,-Bsymbolic -L$(CCTLIB) -Wl,--no-whole-archive -Wl,--no-undefined $(TCPATH)/lib/gcc/arm-eabi/$(GCCVER)/interwork/libgcc.a + +VOTLDEPS:=-lm -lc + + +ifeq ($(VOTT), v4) +VOCFLAGS:=-mtune=arm9tdmi -march=armv4t +VOASFLAGS:=-march=armv4t -mfpu=softfpa +endif + +ifeq ($(VOTT), v5) +VOCFLAGS:=-march=armv5te +VOASFLAGS:=-march=armv5te -mfpu=vfp +endif + +ifeq ($(VOTT), v5x) +VOCFLAGS:=-march=armv5te -mtune=xscale +VOASFLAGS:=-march=armv5te -mfpu=vfp +endif + +ifeq ($(VOTT), v6) +#VOCFLAGS:=-march=armv6 -mtune=arm1136jf-s +#VOASFLAGS:=-march=armv6 +VOCFLAGS:=-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -mapcs -mtpcs-leaf-frame -mlong-calls +VOASFLAGS:=-march=armv6j -mcpu=arm1136jf-s -mfpu=arm1136jf-s -mfloat-abi=softfp -mapcs-float -mapcs-reentrant +endif + +# +# global link options +VOLDFLAGS:=-Wl,-x,-X,--as-needed + + +ifeq ($(VOTT), v7) +VOCFLAGS+=-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp +VOASFLAGS+=-march=armv7-a -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp +VOLDFLAGS+=-Wl,--fix-cortex-a8 +endif + +#global compiling options for ARM target +ifneq ($(VOTT), pc) +VOASFLAGS+=--strip-local-absolute -R +endif + + +ifeq ($(VODBG), yes) +VOCFLAGS+=-D_DEBUG -g +else +VOCFLAGS+=-DNDEBUG -O3 +endif + +VOCFLAGS+=$(VOPREDEF) $(VOMM) -Wall -fsigned-char -fomit-frame-pointer -fno-leading-underscore -fpic -fPIC -pipe -ftracer -fforce-addr -fno-bounds-check #-fvisibility=hidden #-fvisibility-inlines-hidden ##-ftree-loop-linear -mthumb -nostdinc -dD -fprefetch-loop-arrays + + +ifneq ($(VOTT), pc) +VOCFLAGS+=$(CCTCFLAGS) $(CCTINC) +VOCPPFLAGS:=-fno-rtti $(VOCFLAGS) + +ifeq ($(VOMT), exe) +VOLDFLAGS+=$(TELDFLAGS) +endif + +ifeq ($(VOMT), lib) +VOLDFLAGS+=$(TLLDFLAGS) +endif +else +VOCPPFLAGS:=$(VOCFLAGS) +ifeq ($(VOMT), lib) +VOLDFLAGS+=-shared +endif +endif + +ifeq ($(VODBG), yes) +#VOLDFLAGS:= +endif + +# where to place object files +OBJDIR=obj + |