Fix for bug 3508 - Persistent storage support breaks Linux compatibility. Part 2. Neglected to include added files in first commit. GCC_SURGE
authorMike Kinghan <mikek@symbian.org>
Wed, 04 Aug 2010 11:52:10 +0100
branchGCC_SURGE
changeset 94 c5cd29a4600d
parent 93 07b904f40417
child 95 285922d13199
Fix for bug 3508 - Persistent storage support breaks Linux compatibility. Part 2. Neglected to include added files in first commit.
symbian-qemu-0.9.1-12/model-libraries/Makefile
symbian-qemu-0.9.1-12/model-libraries/nvmemmory/Makefile
symbian-qemu-0.9.1-12/model-libraries/nvmemmory/target.mak
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/Makefile	Wed Aug 04 11:52:10 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 := nvmemmory
+
+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/nvmemmory/Makefile	Wed Aug 04 11:52:10 2010 +0100
@@ -0,0 +1,27 @@
+# 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:
+# Toplevel Makefile to build libnvmemmory.so 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/nvmemmory/target.mak	Wed Aug 04 11:52:10 2010 +0100
@@ -0,0 +1,60 @@
+# 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:
+# Bottom level Makefile to build libnvmemmory.so in the current directory
+
+include ../../../qemu-symbian-svp/config-host.mak
+
+sources := nvmemmory.cpp
+objs := nvmemmory.o
+libname := libnvmemmory.so
+soname := $(libname).1
+targ := $(soname).0
+ 
+.phony: all build clean install distclean uninstall
+
+cflags=-DHAVE_STDINT_H
+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)" && \
+	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
+
+
+