merged tag ooo/OOO330_m14
[LibreOffice.git] / extensions / source / macosx / spotlight / makefile.mk
blob3d1cb12d1daba37cce4ca67292a38aa3fa96ce82
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
28 PRJ=../../..
29 PRJNAME=extensions
30 TARGET=spotlightplugin
32 # --- Settings ----------------------------------
33 .INCLUDE : settings.mk
35 .IF "$(OS)"!="MACOSX"
36 dummy:
37 @echo Not using Mac OS X - nothing to build
38 .ENDIF
40 # --- Files -------------------------------------
42 # ... object files ............................
43 SLOFILES= \
44 $(SLO)$/ioapi.obj \
45 $(SLO)$/unzip.obj \
46 $(SLO)$/main.obj \
47 $(SLO)$/GetMetadataForFile.obj \
48 $(SLO)$/OOoContentDataParser.obj \
49 $(SLO)$/OOoMetaDataParser.obj \
50 $(SLO)$/OOoSpotlightImporter.obj \
52 BUNDLE = $(MISC)$/OOoSpotlightImporter.mdimporter
53 CONTENTS = $(BUNDLE)$/Contents
54 RESOURCES = $(CONTENTS)$/Resources
55 MACOS = $(CONTENTS)$/MacOS
57 BUNDLELIBS= -framework CoreFoundation \
58 -framework Foundation \
59 -framework CoreServices \
60 $(ZLIB3RDLIB)
62 plistfiles = $(CONTENTS)$/Info.plist
63 binaries = $(MACOS)$/OOoSpotlightImporter
64 resources = $(RESOURCES)/en.lproj/schema.strings \
65 $(RESOURCES)/schema.xml
67 ZIPFLAGS = -r
68 ZIP1TARGET = mdibundle
69 ZIP1DIR = $(CONTENTS)
70 ZIP1LIST = *
73 # --- Targets ----------------------------------
75 .INCLUDE : target.mk
77 $(ZIP1TARGETN) : $(plistfiles) $(binaries) $(resources)
79 # Info.plist is just versioned and copied into the bundle
80 $(CONTENTS)$/%.plist : mdimporter/%.plist
81 $(MKDIRHIER) $(@:d)
82 $(COPY) "$<" "$@"
84 $(MACOS)$/OOoSpotlightImporter: $(SLOFILES)
85 $(MKDIRHIER) $(@:d)
86 $(CC) -o $(MACOS)$/OOoSpotlightImporter $(SLOFILES:s/.obj/.o/) $(EXTRA_LINKFLAGS) $(BUNDLELIBS) -bundle
87 # we have to change the zlib install name, otherwise the plugin will not work
88 .IF "$(SYSTEM_ZLIB)"=="NO"
89 install_name_tool -change @executable_path/libz.1.dylib @executable_path/../../../../MacOS/libz.1.dylib $(MACOS)$/OOoSpotlightImporter
90 .ENDIF
92 #the resources are just copied
93 $(RESOURCES)$/% : mdimporter/%
94 $(MKDIRHIER) $(@:d)
95 $(COPY) "$<" "$@"