From 7fe60435bce6595a9c58a9bfd8244d74b5320e96 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Jan 2013 08:46:13 +0100 Subject: Import DirectFB141_2k11R3_beta5 --- makefile.voodoo.android | 457 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 457 insertions(+) create mode 100755 makefile.voodoo.android (limited to 'makefile.voodoo.android') diff --git a/makefile.voodoo.android b/makefile.voodoo.android new file mode 100755 index 0000000..c15ffd6 --- /dev/null +++ b/makefile.voodoo.android @@ -0,0 +1,457 @@ +# +# Global setup +TOP = . +SOURCE = $(TOP)/Source +JSSOURCE = $(TOP)/Jslib +CONF_H = $(TOP)/ConfigGeneric + +DESTDIR = / + +NDK_PATH ?= /mnt/data/Android/android-ndk-r4b +NDK_TOOLCHAIN ?= $(NDK_PATH)/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin + +INCLUDES += -I$(NDK_PATH)/build/platforms/android-8/arch-arm/usr/include +#INCLUDES += -I$(NDK_PATH)/platforms/android-14/arch-arm/usr/include +#INCLUDES += -I$(NDK_PATH)/sources/cxx-stl/stlport/stlport + +#APP_STL := stlport_static + +CFLAGS += \ + -fno-short-enums + +CPPFLAGS += \ + -DHAVE_SIGNAL_H \ + -DDIRECT_BUILD_NO_PTHREAD_CANCEL=1 \ + -DDIRECT_BUILD_NO_PTHREAD_CONDATTR=1 \ + -DPTHREADMINIT + +LDFLAGS += \ + -nostdlib \ + -L$(NDK_PATH)/build/platforms/android-8/arch-arm/usr/lib + +#CC := $(NDK_TOOLCHAIN)/arm-linux-androideabi-gcc +#CXX := $(NDK_TOOLCHAIN)/arm-linux-androideabi-g++ +#LD := $(NDK_TOOLCHAIN)/arm-linux-androideabi-ld +#NM := $(NDK_TOOLCHAIN)/arm-linux-androideabi-nm +CC := $(NDK_TOOLCHAIN)/arm-eabi-gcc +CXX := $(NDK_TOOLCHAIN)/arm-eabi-g++ +LD := $(NDK_TOOLCHAIN)/arm-eabi-ld +NM := $(NDK_TOOLCHAIN)/arm-eabi-nm + +# +# Compiler flags +CFLAGS += -ffast-math -Wno-strict-aliasing + +CPPFLAGS += -DDIRECTFB_PURE_VOODOO -DUSE_WEAK_NOTIFICATIONS + + +# +# Version definition +MAJOR = 1 +MINOR = 2 +TINY = 8 +VERSION = $(MAJOR).$(MINOR).$(TINY) + +# Default target +default: all + +# +# Compiler flags +CFLAGS += -fpic -pipe -O2 -Wall + +# +# Linker flags +LDFLAGS += -L. + +# +# Configuration header files +INCLUDES += -I$(CONF_H) + +# +# Preprocessor flags +CPPFLAGS += \ + -DHAVE_CONFIG_H \ + -DHAVE_STDBOOL_H \ + -D_GNU_SOURCE \ + -D_REENTRANT \ + -DVERSION=\"$(VERSION)\" \ + -DBUILDTIME="\"$(buildtime)\"" + +# +# Debug option +ifeq ($(DEBUG),yes) + CPPFLAGS += -DENABLE_DEBUG=1 + CFLAGS += -g3 +else + CPPFLAGS += -DENABLE_DEBUG=0 +endif + +# +# Trace option +ifeq ($(TRACE),yes) + CFLAGS += -finstrument-functions + CPPFLAGS += -DENABLE_TRACE=1 +else + CPPFLAGS += -DENABLE_TRACE=0 +endif + +# +# Installation paths +prefix ?= /opt/directfb +bindir ?= $(prefix)/bin +datadir ?= $(prefix)/share +libdir ?= $(prefix)/lib +moddir ?= $(libdir)/directfb +sysconfdir ?= $(prefix)/etc + +CPPFLAGS += \ + -DDATADIR=\"$(datadir)\" \ + -DMODULEDIR=\"$(moddir)\" \ + -DSYSCONFDIR=\"$(sysconfdir)\" + +buildtime = $(shell sh -c date -u +%Y-%m-%d %H:%M) + +# +# libdirect object files +LIB_DIRECT_OBJECTS = \ + $(SOURCE)/DirectFB/lib/direct/clock.o \ + $(SOURCE)/DirectFB/lib/direct/conf.o \ + $(SOURCE)/DirectFB/lib/direct/debug.o \ + $(SOURCE)/DirectFB/lib/direct/direct.o \ + $(SOURCE)/DirectFB/lib/direct/fastlz.o \ + $(SOURCE)/DirectFB/lib/direct/flz.o \ + $(SOURCE)/DirectFB/lib/direct/hash.o \ + $(SOURCE)/DirectFB/lib/direct/interface.o \ + $(SOURCE)/DirectFB/lib/direct/log.o \ + $(SOURCE)/DirectFB/lib/direct/list.o \ + $(SOURCE)/DirectFB/lib/direct/mem.o \ + $(SOURCE)/DirectFB/lib/direct/memcpy.o \ + $(SOURCE)/DirectFB/lib/direct/messages.o \ + $(SOURCE)/DirectFB/lib/direct/modules.o \ + $(SOURCE)/DirectFB/lib/direct/signals.o \ + $(SOURCE)/DirectFB/lib/direct/stream.o \ + $(SOURCE)/DirectFB/lib/direct/system.o \ + $(SOURCE)/DirectFB/lib/direct/thread.o \ + $(SOURCE)/DirectFB/lib/direct/trace.o \ + $(SOURCE)/DirectFB/lib/direct/tree.o \ + $(SOURCE)/DirectFB/lib/direct/utf8.o \ + $(SOURCE)/DirectFB/lib/direct/util.o + +# +# libfusion object files +LIB_FUSION_OBJECTS = \ + $(SOURCE)/DirectFB/lib/fusion/conf.o \ + $(SOURCE)/DirectFB/lib/fusion/shmalloc.o \ + $(SOURCE)/DirectFB/lib/fusion/vector.o \ + $(SOURCE)/DirectFB/lib/fusion/shm/fake.o + +# +# libvoodoo object files +LIB_VOODOO_OBJECTS = \ + $(SOURCE)/DirectFB/lib/voodoo/client.o \ + $(SOURCE)/DirectFB/lib/voodoo/conf.o \ + $(SOURCE)/DirectFB/lib/voodoo/connection.o \ + $(SOURCE)/DirectFB/lib/voodoo/connection_packet.o \ + $(SOURCE)/DirectFB/lib/voodoo/connection_raw.o \ + $(SOURCE)/DirectFB/lib/voodoo/connection_link.o \ + $(SOURCE)/DirectFB/lib/voodoo/instance.o \ + $(SOURCE)/DirectFB/lib/voodoo/interface.o \ + $(SOURCE)/DirectFB/lib/voodoo/ivoodooplayer.o \ + $(SOURCE)/DirectFB/lib/voodoo/ivoodooplayer_dispatcher.o \ + $(SOURCE)/DirectFB/lib/voodoo/ivoodooplayer_requestor.o \ + $(SOURCE)/DirectFB/lib/voodoo/manager.o \ + $(SOURCE)/DirectFB/lib/voodoo/manager_c.o \ + $(SOURCE)/DirectFB/lib/voodoo/mutex.o \ + $(SOURCE)/DirectFB/lib/voodoo/play.o \ + $(SOURCE)/DirectFB/lib/voodoo/play_server.o \ + $(SOURCE)/DirectFB/lib/voodoo/server.o \ + $(SOURCE)/DirectFB/lib/voodoo/dispatcher.o \ + $(SOURCE)/DirectFB/lib/voodoo/unix/link_unix.o + +# +# DirectFB object files +DIRECTFB_OBJECTS = \ + $(SOURCE)/DirectFB/src/directfb.o \ + $(SOURCE)/DirectFB/src/media/idirectfbdatabuffer.o \ + $(SOURCE)/DirectFB/src/media/idirectfbdatabuffer_file.o \ + $(SOURCE)/DirectFB/src/media/idirectfbdatabuffer_memory.o \ + $(SOURCE)/DirectFB/src/media/idirectfbdatabuffer_streamed.o \ + $(SOURCE)/DirectFB/src/input/idirectfbinputbuffer.o \ + $(SOURCE)/DirectFB/src/gfx/convert.o \ + $(SOURCE)/DirectFB/src/misc/conf.o \ + $(SOURCE)/DirectFB/src/misc/util.o + +# +# DirectFB requestor object files +DIRECTFB_OBJECTS += \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfb_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbfont_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbimageprovider_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbpalette_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbscreen_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbsurface_requestor.o \ + $(SOURCE)/DirectFB/proxy/requestor/idirectfbwindow_requestor.o + +# +# DirectFB dispatcher object files +DIRECTFB_OBJECTS += \ + $(SOURCE)/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.o \ + $(SOURCE)/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.o + +# +# DirectFB Windows extension +DIRECTFB_OBJECTS += \ + $(SOURCE)/DirectFB/interfaces/IDirectFBWindows/idirectfbwindows_requestor.o + +# +# DirectFB header files +DIRECTFB_INCLUDES += \ + -I$(SOURCE)/DirectFB/include \ + -I$(SOURCE)/DirectFB/lib \ + -I$(SOURCE)/DirectFB/src \ + -I$(SOURCE)/DirectFB/proxy/requestor \ + -I$(SOURCE)/DirectFB/proxy/dispatcher \ + -I$(SOURCE)/DirectFB/systems + + +# +# DiVine object files +DIVINE_OBJECTS = \ + $(SOURCE)/DiVine/lib/divine.o \ + $(SOURCE)/DiVine/proxy/requestor/idivine_requestor.o + +# +# DiVine header files and defines +DIVINE_INCLUDES += \ + -I$(SOURCE)/DiVine/include \ + -I$(SOURCE)/DiVine/lib \ + -I$(SOURCE)/DiVine/proxy/dispatcher + +CPPFLAGS += -DDIVINE_MAJOR_VERSION=0 -DDIVINE_MINOR_VERSION=0 + +# +# FusionDale object files +FUSIONDALE_OBJECTS = \ + $(SOURCE)/FusionDale/src/fusiondale.o \ + $(SOURCE)/FusionDale/src/misc/dale_config.o \ + $(SOURCE)/FusionDale/src/coma/policy.o \ + $(SOURCE)/FusionDale/proxy/requestor/ifusiondale_requestor.o \ + $(SOURCE)/FusionDale/proxy/requestor/icoma_requestor.o \ + $(SOURCE)/FusionDale/proxy/requestor/icomacomponent_requestor.o + +# +# ++DFB object files +PPDFB_OBJECTS = \ + $(SOURCE)/++DFB/++dfb/idirectfb.o \ + $(SOURCE)/++DFB/++dfb/idirectfbdatabuffer.o \ + $(SOURCE)/++DFB/++dfb/idirectfbdisplaylayer.o \ + $(SOURCE)/++DFB/++dfb/idirectfbeventbuffer.o \ + $(SOURCE)/++DFB/++dfb/idirectfbfont.o \ + $(SOURCE)/++DFB/++dfb/idirectfbimageprovider.o \ + $(SOURCE)/++DFB/++dfb/idirectfbinputdevice.o \ + $(SOURCE)/++DFB/++dfb/idirectfbpalette.o \ + $(SOURCE)/++DFB/++dfb/idirectfbscreen.o \ + $(SOURCE)/++DFB/++dfb/idirectfbsurface.o \ + $(SOURCE)/++DFB/++dfb/idirectfbvideoprovider.o \ + $(SOURCE)/++DFB/++dfb/idirectfbwindow.o \ + $(SOURCE)/++DFB/++dfb/ppdfb.o + +# +# ++DFB header files and defines +PPDFB_INCLUDES += \ + -I$(SOURCE)/++DFB/include + +# +# FusionDale header files +FUSIONDALE_INCLUDES += \ + -I$(SOURCE)/FusionDale/include \ + -I$(SOURCE)/FusionDale/src \ + -I$(SOURCE)/FusionDale/proxy/dispatcher + +# +# Build list of all objects +OBJECTS += \ + $(LIB_DIRECT_OBJECTS) \ + $(LIB_FUSION_OBJECTS) \ + $(LIB_VOODOO_OBJECTS) \ + $(DIRECTFB_OBJECTS) \ + $(DIVINE_OBJECTS) \ + $(FUSIONDALE_OBJECTS) #\ + $(PPDFB_OBJECTS) + +# +# libjslib object files +JSOBJECTS = \ + $(JSSOURCE)/jslibrc/jslibrc_client.o \ + + +# +# DiVine header files and defines +JSLIB_INCLUDES += \ + -I$(JSSOURCE)/jslibrc + + +# +# Build complete include path +INCLUDES += \ + $(DIRECTFB_INCLUDES) \ + $(DIVINE_INCLUDES) \ + $(FUSIONDALE_INCLUDES) \ + $(PPDFB_INCLUDES) \ + $(JSLIB_INCLUDES) \ + + + +# +# All libraries +LIBS += \ + -lm \ + -ldl \ + -lc + + +# +# All tools and tests +TOOLS += \ + $(SOURCE)/DirectFB/tools/dfbinfo \ + $(SOURCE)/DirectFB/tools/dfbproxy \ + $(SOURCE)/DirectFB/tools/voodooplay \ + $(SOURCE)/DirectFB/tools/voodooplay_client \ + $(SOURCE)/DirectFB/tools/voodooplay_server \ + $(SOURCE)/DiVine/examples/spooky \ + +# +# All tools and tests +JSTOOLS += \ + $(JSSOURCE)/tools/remco \ + $(JSSOURCE)/tools/remco2k11 \ + +# +# List of generated header files +GEN_HEADERS = \ + $(SOURCE)/DirectFB/include/directfb_keynames.h \ + $(SOURCE)/DirectFB/include/directfb_strings.h \ + $(SOURCE)/DirectFB/include/directfb_version.h + + +#LIBRARY = libdirectfb.so +LIBRARY = libdirectfb.o + +JSLIBRARY = libjslibclient.o + +HEADERS = \ + $(CONF_H)/direct/build.h \ + $(CONF_H)/fusion/build.h \ + $(SOURCE)/DirectFB/lib/direct/*.h \ + $(SOURCE)/DirectFB/lib/fusion/*.h \ + $(SOURCE)/DirectFB/lib/voodoo/*.h \ + $(SOURCE)/DirectFB/include/dfb_types.h \ + $(SOURCE)/DirectFB/include/directfb.h \ + $(SOURCE)/DirectFB/include/directfb_keyboard.h \ + $(SOURCE)/DirectFB/include/directfb_keynames.h \ + $(SOURCE)/DirectFB/include/directfb_strings.h \ + $(SOURCE)/DirectFB/include/directfb_util.h \ + $(SOURCE)/DirectFB/include/directfb_version.h \ + $(SOURCE)/DirectFB/include/directfb_windows.h \ + $(SOURCE)/DirectFB/src/gfx/convert.h \ + $(SOURCE)/DiVine/include/divine.h \ + $(SOURCE)/++DFB/include/++dfb.h \ + $(SOURCE)/++DFB/include/idirectfbdatabuffer.h \ + $(SOURCE)/++DFB/include/idirectfbdisplaylayer.h \ + $(SOURCE)/++DFB/include/idirectfbeventbuffer.h \ + $(SOURCE)/++DFB/include/idirectfbfont.h \ + $(SOURCE)/++DFB/include/idirectfb.h \ + $(SOURCE)/++DFB/include/idirectfbimageprovider.h \ + $(SOURCE)/++DFB/include/idirectfbinputdevice.h \ + $(SOURCE)/++DFB/include/idirectfbpalette.h \ + $(SOURCE)/++DFB/include/idirectfbscreen.h \ + $(SOURCE)/++DFB/include/idirectfbsurface.h \ + $(SOURCE)/++DFB/include/idirectfbvideoprovider.h \ + $(SOURCE)/++DFB/include/idirectfbwindow.h \ + $(SOURCE)/FusionDale/include/fusiondale.h \ + $(JSSOURCE)/jslibrc/jslibrc_types.h \ + $(JSSOURCE)/jslibrc/jslibrc_client.h \ + + +PACKAGE = DirectFB_Voodoo.tar.gz + +# +# Rules +all: $(LIBRARY) $(JSLIBRARY) #$(JSTOOLS) $(TOOLS) $(TEST) $(TOOLS:%=%.nm) + +package: $(PACKAGE) + +libdirectfb.o: $(OBJECTS) + $(LD) $(LDFLAGS) -r -o $@ $(OBJECTS) + +libdirectfb.so: $(OBJECTS) + $(CXX) -shared -Wl,-soname,libdirectfb.so $(LDFLAGS) $(LIBS) -o $@ $(OBJECTS) + +libdirectfb.so.nm: libdirectfb.so + $(NM) -n libdirectfb.so > libdirectfb.so.nm + +libjslibclient.o: $(JSOBJECTS) + $(LD) $(LDFLAGS) -r -o $@ $(JSOBJECTS) + +headers: + @echo $(HEADERS) + +sources: + @echo $(OBJECTS:%.o=%.c) + +objects: + @echo $(OBJECTS) + +%.o: %.c $(GEN_HEADERS) + $(CC) $(CFLAGS) -c $(CPPFLAGS) $(INCLUDES) -o $@ $< + +%.o: %.cpp $(GEN_HEADERS) + $(CXX) $(CFLAGS) -c $(CPPFLAGS) $(INCLUDES) -o $@ $< + +$(SOURCE)/DirectFB/tests/%: $(SOURCE)/DirectFB/tests/%.o libdirectfb.o + $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS) + +$(SOURCE)/DirectFB/tools/%: $(SOURCE)/DirectFB/tools/%.o libdirectfb.o + $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS) + +$(SOURCE)/DiVine/examples/%: $(SOURCE)/DiVine/examples/%.o libdirectfb.o + $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS) + +$(JSSOURCE)/tools/%: $(JSSOURCE)/tools/%.o libdirectfb.o libjslibclient.o + $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS) + +%.nm: % + $(NM) -n $< > $@ + + +.PHONY: clean install + +clean:: + rm -f libdirectfb.*o* libjslibclient.*o* $(TOOLS) $(JSTOOLS) $(TEST) + find -name "*.o" | xargs rm -f + find -name "*.so" | xargs rm -f + find -name "*.nm" | xargs rm -f + +install:: all + @(if test -z "$(DESTDIR)"; then echo "**** DESTDIR not set! ****"; exit 1; fi) + install -d $(DESTDIR)$(bindir) + install -d $(DESTDIR)$(libdir) + install -d $(DESTDIR)$(moddir) + install -d $(DESTDIR)$(moddir)/inputdrivers + install -d $(DESTDIR)$(moddir)/interfaces + install -d $(DESTDIR)$(moddir)/gfxdrivers + install -d $(DESTDIR)$(moddir)/systems + install -d $(DESTDIR)$(moddir)/wm + install -c -m 755 $(TEST) $(TOOLS) $(TOOLS:%=%.nm) $(DESTDIR)$(bindir)/ + install -c -m 755 libdirectfb.so $(DESTDIR)$(libdir)/ + install -c -m 644 libdirectfb.so.nm $(DESTDIR)$(libdir)/ + + +$(PACKAGE): $(LIBRARY) $(JSLIBRARY) $(HEADERS) + ./build-package.sh $@ $+ + + +DFBINC = $(SOURCE)/DirectFB/include +MKNAMES = $(SOURCE)/DirectFB/include/mknames.sh -- cgit