Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (28 sloc) 1.46 KB
COMMON_FLAGS=
ifeq ($(ARCH),arm)
ARCHFLAGS = -DHAVE_ARM_TLS_REGISTER -DANDROID_ARM_LINKER
else
ARCHFLAGS = -DANDROID_X86_LINKER
endif
COMMON_SOURCES=common/strlcpy.c common/hooks.c common/properties.c
GINGERBREAD_SOURCES=gingerbread/linker.c gingerbread/dlfcn.c gingerbread/rt.c gingerbread/linker_environ.c gingerbread/linker_format.c
all: libhybris_gingerbread.so test_gingerbread libEGL.so.1 test_egl libGLESv2.so.2 test_glesv2
libhybris_gingerbread.so: $(COMMON_SOURCES) $(GINGERBREAD_SOURCES)
$(CC) -g -shared -o $@ -ldl -pthread -fPIC -Igingerbread -Icommon -DLINKER_DEBUG=1 -DLINKER_TEXT_BASE=0xB0000100 -DLINKER_AREA_SIZE=0x01000000 $(ARCHFLAGS) \
$(GINGERBREAD_SOURCES) $(COMMON_SOURCES)
test_gingerbread: libhybris_gingerbread.so test.c
$(CC) -g -o $@ -ldl test.c $<
libEGL.so.1.0: egl/egl.c
$(CC) -g -shared -o $@ -fPIC -Wl,-soname,libEGL.so.1 $< libhybris_gingerbread.so
libEGL.so.1: libEGL.so.1.0
ln -sf libEGL.so.1.0 libEGL.so.1
test_egl: libEGL.so.1 egl/test.c libhybris_gingerbread.so
$(CC) -g -o $@ libEGL.so.1 libhybris_gingerbread.so egl/test.c
libGLESv2.so.2.0: glesv2/gl2.c
$(CC) -g -shared -o $@ -fPIC -Wl,-soname,libGLESv2.so.2 $< libhybris_gingerbread.so
libGLESv2.so.2: libGLESv2.so.2.0
ln -sf libGLESv2.so.2.0 libGLESv2.so.2
test_glesv2: libEGL.so.1 libGLESv2.so.2 egl/test.c libhybris_gingerbread.so
$(CC) -g -o $@ -lm libEGL.so.1 libhybris_gingerbread.so libGLESv2.so.2 glesv2/test.c
clean:
rm -rf libhybris_gingerbread.so test_gingerbread