summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-04-09 22:40:58 +0300
committerTor Lillqvist <tml@iki.fi>2012-04-09 22:43:53 +0300
commitd25ef83c1293f1596d2d2d4d4643e3278959823a (patch)
tree96ba0eb0e58646546f4c90d2bcd95f6c8975b3fa /ios
parent0b67dd10f858caf46a1d55aff1de319d161f44cf (diff)
Add the lo_get_libmap() for this test app
Diffstat (limited to 'ios')
-rw-r--r--ios/qa/sc/Makefile11
-rw-r--r--ios/qa/sc/filters-test.m26
2 files changed, 33 insertions, 4 deletions
diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index 5d3bcf5baf87..d46e14e46472 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -15,6 +15,15 @@ APPDIR=build/Debug-$(PLATFORM)/$(APP).app
# Stuff lifted from solenv/gbuild/platform/IOS_ARM_GCC.mk
+gb_OSDEFS := \
+ -D$(OS) \
+ -D_PTHREADS \
+ -DUNIX \
+ -DUNX \
+ -D_REENTRANT \
+ -DNO_PTHREAD_PRIORITY \
+ $(EXTRA_CDEFS) \
+
gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -g
gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS)
gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS)
@@ -36,7 +45,7 @@ all: $(APPDIR)/$(APP) stuff
$(APPDIR)/$(APP): $(SRCS)
mkdir -p $(APPDIR)
- $(CXX) -Wl,-map,$(APP).map.mangled -o $@ $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
+ $(CXX) -Wl,-map,$(APP).map.mangled -o $@ $(gb_OSDEFS) $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
c++filt <$(APP).map.mangled >$(APP).map && rm $(APP).map.mangled
stuff:
diff --git a/ios/qa/sc/filters-test.m b/ios/qa/sc/filters-test.m
index c6650eaf3c38..42b0816b1430 100644
--- a/ios/qa/sc/filters-test.m
+++ b/ios/qa/sc/filters-test.m
@@ -35,11 +35,32 @@
#include "cppunit/plugin/TestPlugIn.h"
//#include "cppunit/plugin/PlugInManager.h"
+#include <osl/detail/ios-bootstrap.h>
+
+#ifdef __cplusplus
extern "C" {
- extern CppUnitTestPlugIn *cppunitTestPlugIn(void);
- extern int lo_main(int argc, const char **argv);
+#endif
+
+extern CppUnitTestPlugIn *cppunitTestPlugIn(void);
+extern int lo_main(int argc, const char **argv);
+
+extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+
+const lib_to_component_mapping *
+lo_get_libmap(void)
+{
+ static lib_to_component_mapping map[] = {
+ { "libsclo.a", sc_component_getFactory },
+ { NULL, NULL }
+ };
+
+ return map;
}
+#ifdef __cplusplus
+}
+#endif
+
int
main(int argc, char ** argv)
{
@@ -160,4 +181,3 @@ didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
@end
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-