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