merged tag ooo/DEV300_m102
[LibreOffice.git] / desktop / util / makefile.mk
blob8cf03f157254d9eb421fa7d98e5d543efa970a09
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=..
30 PRJNAME=desktop
31 TARGET=soffice
32 TARGETTYPE=GUI
33 LIBTARGET=NO
34 GEN_HID=TRUE
35 GEN_HID_OTHER=TRUE
37 # --- Settings -----------------------------------------------------------
39 .INCLUDE : settings.mk
41 UWINAPILIB =
43 VERINFONAME=verinfo
45 # --- Resourcen ----------------------------------------------------
47 .IF "$(GUI)" == "WNT"
48 RCFILES=verinfo.rc
49 .ENDIF
50 .IF "$(GUI)" == "OS2"
51 RCFILES=ooverinfo2.rc
52 .ENDIF
54 # --- Linken der Applikation ---------------------------------------
56 .IF "$(OS)" == "MACOSX"
57 LINKFLAGSAPPGUI!:= $(LINKFLAGSAPPGUI:s/-bind_at_load//)
58 .ENDIF # MACOSX
60 #.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" || "$(OS)" == "NETBSD"
61 ## #74158# linux needs sal/vos/tools at end of link list, solaris needs it first,
62 ## winXX is handled like solaris for now
63 #APP1_STDPRE=
64 #APP1_STDPOST=$(CPPULIB) $(CPPUHELPERLIB) $(UNOLIB) $(TOOLSLIB) \
65 # $(VOSLIB) $(SALLIB)
66 #.ELSE
67 #APP1_STDPRE=$(SALLIB) $(VOSLIB) $(TOOLSLIB) $(UNOLIB) $(CPPULIB) \
68 # $(CPPUHELPERLIB)
69 #APP1_STDPOST=
70 #.ENDIF
72 RESLIB1NAME= dkt
73 RESLIB1IMAGES= $(PRJ)$/res
74 RESLIB1SRSFILES= $(SRS)$/desktop.srs \
75 $(SRS)$/wizard.srs
77 .IF "$(L10N_framework)"==""
78 .IF "$(LINK_SO)"=="TRUE"
79 .IF "$(GUI)" != "OS2"
80 APP1TARGET=so$/$(TARGET)
81 APP1NOSAL=TRUE
82 APP1RPATH=BRAND
83 APP1OBJS=$(OBJ)$/copyright_ascii_sun.obj $(OBJ)$/main.obj
84 APP1STDLIBS = $(SALLIB) $(SOFFICELIB)
85 APP1DEPN= $(APP1RES) verinfo.rc
87 .IF "$(GUI)" == "WNT"
88 APP1RES= $(RES)$/desktop.res
89 APP1ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
90 APP1VERINFO=verinfo.rc
91 APP1LINKRES=$(MISC)$/$(TARGET)1.res
92 APP1STACK=10000000
94 # create a manifest file with the same name as the
95 #office executable file soffice.exe.manifest
96 #$(BIN)$/$(TARGET).exe.manifest: template.manifest
97 #$(COPY) $< $@
99 .ENDIF # WNT
101 .ENDIF # "$(GUI)" != "OS2"
103 .ENDIF # "$(LINK_SO)"=="TRUE"
105 APP5TARGET=soffice
106 APP5NOSAL=TRUE
107 APP5RPATH=BRAND
108 APP5OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/main.obj
109 APP5STDLIBS = $(SALLIB) $(SOFFICELIB)
110 .IF "$(OS)" == "LINUX"
111 APP5STDLIBS+= -lXext -lX11
112 #APP5STDLIBS+= -lXext -lSM -lICE
113 .ENDIF # LINUX
115 APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
116 APP5DEF= $(MISCX)$/$(TARGET).def
118 .IF "$(GUI)" == "WNT"
119 APP5RES= $(RES)$/oodesktop.res
120 APP5ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
121 APP5VERINFO=ooverinfo.rc
122 APP5LINKRES=$(MISC)$/ooffice5.res
123 APP5STACK=10000000
124 .ENDIF # WNT
126 .IF "$(GUI)" == "OS2"
127 APP5DEF= # automatic
128 APP5RES= $(RES)$/oodesktop.res
129 APP5ICON=$(SOLARRESDIR)$/icons/ooo-main-app.ico
130 APP5VERINFO=ooverinfo2.rc
131 APP5LINKRES=$(MISC)$/ooffice.res
132 .ENDIF # OS2
134 .IF "$(GUI)" == "WNT"
135 .IF "$(LINK_SO)"=="TRUE"
136 APP6TARGET=so$/officeloader
137 APP6RES=$(RES)$/soloader.res
138 APP6NOSAL=TRUE
139 APP6DEPN= $(APP1TARGETN) $(APP6RES) verinfo.rc
140 APP6VERINFO=verinfo.rc
141 APP6LINKRES=$(MISC)$/soffice6.res
142 APP6ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
143 APP6OBJS = \
144 $(OBJ)$/extendloaderenvironment.obj \
145 $(OBJ)$/officeloader.obj \
146 $(SOLARLIBDIR)$/pathutils-obj.obj
147 STDLIB6=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB)
148 .ENDIF # "$(LINK_SO)"=="TRUE"
150 APP7TARGET=officeloader
151 APP7RES=$(RES)$/ooloader.res
152 APP7NOSAL=TRUE
153 APP7DEPN= $(APP1TARGETN) $(APP7RES) ooverinfo.rc
154 APP7VERINFO=ooverinfo.rc
155 APP7LINKRES=$(MISC)$/ooffice7.res
156 APP7ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
157 APP7OBJS = \
158 $(OBJ)$/extendloaderenvironment.obj \
159 $(OBJ)$/officeloader.obj \
160 $(SOLARLIBDIR)$/pathutils-obj.obj
161 STDLIB7=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB)
162 .ELIF "$(OS)" == "MACOSX"
163 APP6TARGET=officeloader
164 APP6NOSAL=TRUE
165 APP6RPATH=BRAND
166 APP6OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/officeloader.obj
167 APP6STDLIBS = $(SALLIB)
168 APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
169 APP5DEF= $(MISCX)$/$(TARGET).def
170 .ENDIF # WNT
172 .ENDIF
174 # --- Targets -------------------------------------------------------------
176 .INCLUDE : target.mk
178 .IF "$(L10N_framework)"==""
180 .IF "$(APP1TARGETN)"!=""
181 $(APP1TARGETN) : $(MISC)$/binso_created.flg
182 .ENDIF # "$(APP1TARGETN)"!=""
184 .IF "$(APP5TARGETN)"!=""
185 $(APP5TARGETN) : $(MISC)$/binso_created.flg
186 .ENDIF # "$(APP6TARGETN)"!=""
188 .IF "$(APP6TARGETN)"!=""
189 $(APP6TARGETN) : $(MISC)$/binso_created.flg
190 .ENDIF # "$(APP6TARGETN)"!=""
192 .IF "$(GUI)" == "WNT"
193 ALLTAR: $(MISC)$/$(TARGET).exe.manifest
194 ALLTAR: $(MISC)$/$(TARGET).bin.manifest
195 ALLTAR: $(BIN)$/$(TARGET).bin
196 .IF "$(LINK_SO)"=="TRUE"
197 ALLTAR: $(BIN)$/so$/$(TARGET).bin
198 .ENDIF # "$(LINK_SO)"=="TRUE"
199 .ENDIF # WNT
201 .IF "$(GUI)" == "OS2"
202 ALLTAR: $(BIN)$/$(TARGET).bin
203 .ENDIF # OS2
205 $(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN)
206 $(COPY) $< $@
208 .IF "$(GUI)" != "OS2"
209 .IF "$(LINK_SO)"=="TRUE"
210 $(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN)
211 $(COPY) $< $@
213 ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST)
214 .ENDIF # "$(LINK_SO)"=="TRUE"
215 ALLTAR : $(BIN)$/soffice_oo$(EXECPOST)
216 .ENDIF
218 .IF "$(OS)" == "MACOSX"
219 .IF "$(LINK_SO)"=="TRUE"
220 $(BIN)$/so$/soffice_mac$(EXECPOST) : $(APP1TARGETN)
221 $(COPY) $< $@
223 ALLTAR : $(BIN)$/so$/soffice_mac$(EXECPOST)
224 .ENDIF # "$(LINK_SO)"=="TRUE"
226 $(BIN)$/soffice_mac$(EXECPOST) : $(APP5TARGETN)
227 $(COPY) $< $@
229 ALLTAR : $(BIN)$/soffice_mac$(EXECPOST)
231 .ENDIF # "$(OS)" == "MACOSX"
233 .IF "$(GUI)" == "WNT"
235 # create a manifest file with the same name as the
236 # office executable file soffice.exe.manifest
237 .IF "$(CCNUMVER)" <= "001399999999"
238 $(MISC)$/$(TARGET).exe.manifest: template.manifest
239 $(COPY) $< $@
240 .ELSE
241 $(MISC)$/$(TARGET).exe.template.manifest: template.manifest
242 $(COPY) $< $@
244 $(MISC)$/$(TARGET).exe.linker.manifest: $(BIN)$/$(TARGET)$(EXECPOST)
245 mt.exe -inputresource:$(BIN)$/$(TARGET)$(EXECPOST) -out:$@
247 $(MISC)$/$(TARGET).exe.manifest: $(MISC)$/$(TARGET).exe.template.manifest $(MISC)$/$(TARGET).exe.linker.manifest
248 mt.exe -manifest $(MISC)$/$(TARGET).exe.linker.manifest $(MISC)$/$(TARGET).exe.template.manifest -out:$@
249 .ENDIF
251 # create a manifest file with the same name as the
252 # office executable file soffice.bin.manifest
253 .IF "$(CCNUMVER)" <= "001399999999"
254 $(MISC)$/$(TARGET).bin.manifest: template.manifest
255 $(COPY) $< $@
256 .ELSE
257 $(MISC)$/$(TARGET).bin.manifest: $(MISC)$/$(TARGET).exe.manifest
258 $(COPY) $(MISC)$/$(TARGET).exe.manifest $@
259 .ENDIF
261 $(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
262 $(COPY) $< $@
264 $(BIN)$/so$/$(TARGET).bin: $(BIN)$/so$/$(TARGET)$(EXECPOST)
265 $(COPY) $< $@
267 .ENDIF # WNT
269 .IF "$(GUI)" == "OS2"
270 $(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
271 $(COPY) $< $@
272 .ENDIF # OS2
274 $(MISC)$/binso_created.flg :
275 @@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@
277 .ENDIF