Added Makefile for building syborg-graphicswrapper using GCC graphics-phase-3
authorGareth Stockwell <gareth.stockwell@accenture.com>
Tue, 14 Sep 2010 17:21:05 +0100
branchgraphics-phase-3
changeset 109 ae83407e7b6a
parent 99 542d4bc8b7ca
child 110 52ce3e8fba90
Added Makefile for building syborg-graphicswrapper using GCC At present the build fails due to the following missing headers: KhronosAPIWrapper.h VirtualVideoInterfaceConstants.h platformthreading.h protocol_MGraphicsVHWCallback.h
symbian-qemu-0.9.1-12/model-libraries/Makefile
symbian-qemu-0.9.1-12/model-libraries/commoninc/platformtypes.h
symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/Makefile
symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/target.mak
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/Makefile	Tue Sep 14 17:21:05 2010 +0100
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Mike Kinghan, mikek@symbian.org, for Symbian Foundation - Initial contribution
+# 
+# Description:
+# Makefile to build all available model libraries.
+
+.phony: all clean install distclean
+
+# Append new model library dirs here.
+subdirs := syborg-graphicswrapper/
+
+all clean install distclean:
+	for d in $(subdirs); do $(MAKE) -C $$d $@; done
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/commoninc/platformtypes.h	Tue Sep 14 17:21:05 2010 +0100
@@ -0,0 +1,23 @@
+#ifndef PLATFORMTYPES_H
+#define PLATFORMTYPES_H
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+// TODO: We should have a proper type definition file created common for standalone model libraries
+typedef signed __int8         int8_t;
+typedef signed __int16        int16_t;
+typedef signed __int32        int32_t;
+typedef signed __int64        int64_t;
+typedef unsigned __int8     uint8_t;
+typedef unsigned __int8     u_int8_t;
+typedef unsigned __int16    uint16_t;
+typedef unsigned __int16    u_int16_t;
+typedef unsigned __int32    uint32_t;
+typedef unsigned __int32    u_int32_t;
+typedef unsigned __int64    uint64_t;
+typedef unsigned __int64    u_int64_t;
+typedef unsigned char byte_t;
+#endif
+
+
+#endif // PLATFORMTYPES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/Makefile	Tue Sep 14 17:21:05 2010 +0100
@@ -0,0 +1,24 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Description:
+# Toplevel Makefile to build syborg-graphicswrapper library in either debug or release mode
+
+.phony: all clean install distclean
+
+
+# Ensure DEBUG_LIBS is defined to make a debug build
+ifneq ($(DEBUG_LIBS),)
+build_dir=Debug 
+else
+build_dir=Release 
+endif
+
+all clean install distclean:
+	$(MAKE) -C $(build_dir) $@ -f ../target.mak
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/target.mak	Tue Sep 14 17:21:05 2010 +0100
@@ -0,0 +1,58 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Description:
+# Bottom level Makefile to build syborg-graphicswrapper library in the current directory
+
+include ../../../qemu-symbian-svp/config-host.mak
+
+sources := syborg-graphicswrapper.cpp
+objs := syborg-graphicswrapper.o
+libname := libsyborg-graphicswrapper.so
+soname := $(libname).1
+targ := $(soname).0
+ 
+.phony: all build clean install distclean uninstall
+
+cflags=-DHAVE_STDINT_H -DSYBORG_GRAPHICSWRAPPER_EXPORTS
+ifneq ($(DEBUG_LIBS),)
+cflags+="-O0 -g"
+else
+cflags+=-O2
+endif
+
+vpath %.cpp ..
+
+all: $(targ)
+
+%.o : %.cpp
+	g++ $(cflags) -fPIC -I../../commoninc -c -o $@ $<
+
+$(objs): $(sources)
+
+$(targ): $(objs)
+	g++ $(cflags) -shared -Wl,-soname,$(soname) -Wl,-l,stdc++ -o $@ $(objs)
+
+clean:
+	rm -f $(objs) $(targ)
+
+install: $(targ)
+	if [ ! -d "$(DESTDIR)$(libdir)" ]; then mkdir -p "$(DESTDIR)$(libdir)"; fi && \
+	$(INSTALL) -m 755 $(targ) "$(DESTDIR)$(libdir)" && \
+	rm -f "$(DESTDIR)$(libdir)/$(libname)" && \
+	ln -s "$(DESTDIR)$(libdir)/$(targ)" "$(DESTDIR)$(libdir)/$(libname)"
+
+distclean: clean
+#	Nothing for distclean
+
+uninstall:
+	rm -f "$(DESTDIR)$(libdir)/$(libname)" "$(DESTDIR)$(libdir)/$(targ)" && \
+	files=`ls -A "$(DESTDIR)$(libdir)"` && \
+	if [ -z "$$files" ]; then rmdir "$(DESTDIR)$(libdir)"; fi
+
+
+