symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/target.mak
author Gareth Stockwell <gareth.stockwell@accenture.com>
Tue, 14 Sep 2010 17:21:05 +0100
branchgraphics-phase-3
changeset 109 ae83407e7b6a
permissions -rw-r--r--
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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
109
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     1
# Copyright (c) 2010 Symbian Foundation.
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     2
# All rights reserved.
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     7
#
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     8
# Description:
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     9
# Bottom level Makefile to build syborg-graphicswrapper library in the current directory
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    10
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    11
include ../../../qemu-symbian-svp/config-host.mak
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    12
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    13
sources := syborg-graphicswrapper.cpp
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    14
objs := syborg-graphicswrapper.o
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    15
libname := libsyborg-graphicswrapper.so
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    16
soname := $(libname).1
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    17
targ := $(soname).0
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    18
 
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    19
.phony: all build clean install distclean uninstall
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    20
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    21
cflags=-DHAVE_STDINT_H -DSYBORG_GRAPHICSWRAPPER_EXPORTS
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    22
ifneq ($(DEBUG_LIBS),)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    23
cflags+="-O0 -g"
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    24
else
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    25
cflags+=-O2
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    26
endif
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    27
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    28
vpath %.cpp ..
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    29
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    30
all: $(targ)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    31
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    32
%.o : %.cpp
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    33
	g++ $(cflags) -fPIC -I../../commoninc -c -o $@ $<
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    34
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    35
$(objs): $(sources)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    36
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    37
$(targ): $(objs)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    38
	g++ $(cflags) -shared -Wl,-soname,$(soname) -Wl,-l,stdc++ -o $@ $(objs)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    39
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    40
clean:
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    41
	rm -f $(objs) $(targ)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    42
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    43
install: $(targ)
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    44
	if [ ! -d "$(DESTDIR)$(libdir)" ]; then mkdir -p "$(DESTDIR)$(libdir)"; fi && \
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    45
	$(INSTALL) -m 755 $(targ) "$(DESTDIR)$(libdir)" && \
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    46
	rm -f "$(DESTDIR)$(libdir)/$(libname)" && \
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    47
	ln -s "$(DESTDIR)$(libdir)/$(targ)" "$(DESTDIR)$(libdir)/$(libname)"
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    48
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    49
distclean: clean
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    50
#	Nothing for distclean
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    51
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    52
uninstall:
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    53
	rm -f "$(DESTDIR)$(libdir)/$(libname)" "$(DESTDIR)$(libdir)/$(targ)" && \
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    54
	files=`ls -A "$(DESTDIR)$(libdir)"` && \
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    55
	if [ -z "$$files" ]; then rmdir "$(DESTDIR)$(libdir)"; fi
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    56
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    57
ae83407e7b6a Added Makefile for building syborg-graphicswrapper using GCC
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    58