The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 1 | # Assumes PREBUILT is defined to point to the correct flavor of the prebuilt |
| 2 | # directory in the Android source tree |
| 3 | |
| 4 | CC := $(PREBUILT)/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc |
| 5 | AR := $(PREBUILT)/toolchain/arm-eabi-4.2.1/bin/arm-eabi-ar |
| 6 | |
| 7 | INC := -I$(NDK_BASE)/include/bionic/libc/arch-arm/include \ |
| 8 | -I$(NDK_BASE)/include/kernel/include \ |
| 9 | -I$(NDK_BASE)/include/bionic/libm/include \ |
| 10 | -I$(NDK_BASE)/include/bionic/libm/include/arm \ |
| 11 | -I$(NDK_BASE)/include/bionic/libc/include \ |
| 12 | -I$(NDK_BASE)/include/bionic/libstdc++/include |
| 13 | |
| 14 | LINK := -nostdlib -Bdynamic \ |
| 15 | -Wl,-T,$(NDK_BASE)/config/armelf.x \ |
| 16 | -Wl,-dynamic-linker,/system/bin/linker \ |
| 17 | -Wl,-z,nocopyreloc \ |
| 18 | -L$(NDK_BASE)/lib \ |
| 19 | -Wl,-rpath-link=$(NDK_BASE)/lib \ |
| 20 | $(NDK_BASE)/lib/crtbegin_dynamic.o |
| 21 | |
| 22 | POSTLINK := $(NDK_BASE)/lib/crtend_android.o |
| 23 | |
| 24 | %.o: %.cpp |
| 25 | $(CC) $(CFLAGS) -fno-exceptions -fno-rtti $(INC) -o $@ -c $< |
| 26 | |
| 27 | %.o: %.c |
| 28 | $(CC) $(CFLAGS) $(INC) -o $@ -c $< |
| 29 | |