xref: /aoo41x/main/desktop/util/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27
28PRJ=..
29
30PRJNAME=desktop
31TARGET=soffice
32TARGETTYPE=GUI
33LIBTARGET=NO
34GEN_HID=TRUE
35GEN_HID_OTHER=TRUE
36
37# --- Settings -----------------------------------------------------------
38
39.INCLUDE :  settings.mk
40
41UWINAPILIB =
42
43VERINFONAME=verinfo
44
45# --- Resourcen ----------------------------------------------------
46
47.IF "$(GUI)" == "WNT"
48RCFILES=verinfo.rc
49.ENDIF
50.IF "$(GUI)" == "OS2"
51RCFILES=ooverinfo2.rc
52.ENDIF
53
54# --- Linken der Applikation ---------------------------------------
55
56.IF "$(OS)" == "MACOSX"
57LINKFLAGSAPPGUI!:=	$(LINKFLAGSAPPGUI:s/-bind_at_load//)
58.ENDIF # MACOSX
59
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
71
72RESLIB1NAME=		dkt
73RESLIB1IMAGES=		$(PRJ)$/res
74RESLIB1SRSFILES=	$(SRS)$/desktop.srs \
75                    $(SRS)$/wizard.srs
76
77.IF "$(L10N_framework)"==""
78.IF "$(LINK_SO)"=="TRUE"
79.IF "$(GUI)" != "OS2"
80APP1TARGET=so$/$(TARGET)
81APP1NOSAL=TRUE
82APP1RPATH=BRAND
83APP1OBJS=$(OBJ)$/copyright_ascii_sun.obj $(OBJ)$/main.obj
84APP1STDLIBS = $(SALLIB) $(SOFFICELIB)
85APP1DEPN= $(APP1RES) verinfo.rc
86
87.IF "$(GUI)" == "WNT"
88APP1RES=    $(RES)$/desktop.res
89APP1ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
90APP1VERINFO=verinfo.rc
91APP1LINKRES=$(MISC)$/$(TARGET)1.res
92APP1STACK=10000000
93
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) $< $@
98
99.ENDIF # WNT
100
101.ENDIF # "$(GUI)" != "OS2"
102
103.ENDIF # "$(LINK_SO)"=="TRUE"
104
105APP5TARGET=soffice
106APP5NOSAL=TRUE
107APP5RPATH=BRAND
108APP5OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/main.obj
109APP5STDLIBS = $(SALLIB) $(SOFFICELIB)
110.IF "$(OS)" == "LINUX"
111APP5STDLIBS+= -lXext -lX11
112#APP5STDLIBS+= -lXext -lSM -lICE
113.ENDIF # LINUX
114
115APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
116APP5DEF=    $(MISCX)$/$(TARGET).def
117
118.IF "$(GUI)" == "WNT"
119APP5RES=    $(RES)$/oodesktop.res
120APP5ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
121APP5VERINFO=ooverinfo.rc
122APP5LINKRES=$(MISC)$/ooffice5.res
123APP5STACK=10000000
124.ENDIF # WNT
125
126.IF "$(GUI)" == "OS2"
127APP5DEF= # automatic
128APP5RES=    $(RES)$/oodesktop.res
129APP5ICON=$(SOLARRESDIR)$/icons/ooo-main-app.ico
130APP5VERINFO=ooverinfo2.rc
131APP5LINKRES=$(MISC)$/ooffice.res
132.ENDIF # OS2
133
134.IF "$(GUI)" == "WNT"
135.IF "$(LINK_SO)"=="TRUE"
136APP6TARGET=so$/officeloader
137APP6RES=$(RES)$/soloader.res
138APP6NOSAL=TRUE
139APP6DEPN= $(APP1TARGETN) $(APP6RES) verinfo.rc
140APP6VERINFO=verinfo.rc
141APP6LINKRES=$(MISC)$/soffice6.res
142APP6ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
143APP6OBJS = \
144    $(OBJ)$/extendloaderenvironment.obj \
145    $(OBJ)$/officeloader.obj \
146    $(SOLARLIBDIR)$/pathutils-obj.obj
147STDLIB6=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB)
148.ENDIF # "$(LINK_SO)"=="TRUE"
149
150APP7TARGET=officeloader
151APP7RES=$(RES)$/ooloader.res
152APP7NOSAL=TRUE
153APP7DEPN= $(APP1TARGETN) $(APP7RES) ooverinfo.rc
154APP7VERINFO=ooverinfo.rc
155APP7LINKRES=$(MISC)$/ooffice7.res
156APP7ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
157APP7OBJS = \
158    $(OBJ)$/extendloaderenvironment.obj \
159    $(OBJ)$/officeloader.obj \
160    $(SOLARLIBDIR)$/pathutils-obj.obj
161STDLIB7=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB)
162.ELIF "$(OS)" == "MACOSX"
163APP6TARGET=officeloader
164APP6NOSAL=TRUE
165APP6RPATH=BRAND
166APP6OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/officeloader.obj
167APP6STDLIBS = $(SALLIB)
168APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
169APP5DEF=    $(MISCX)$/$(TARGET).def
170.ENDIF # WNT
171
172.ENDIF
173
174# --- Targets -------------------------------------------------------------
175
176.INCLUDE :  target.mk
177
178.IF "$(L10N_framework)"==""
179
180.IF "$(APP1TARGETN)"!=""
181$(APP1TARGETN) :  $(MISC)$/binso_created.flg
182.ENDIF			# "$(APP1TARGETN)"!=""
183
184.IF "$(APP5TARGETN)"!=""
185$(APP5TARGETN) :  $(MISC)$/binso_created.flg
186.ENDIF			# "$(APP6TARGETN)"!=""
187
188.IF "$(APP6TARGETN)"!=""
189$(APP6TARGETN) :  $(MISC)$/binso_created.flg
190.ENDIF			# "$(APP6TARGETN)"!=""
191
192.IF "$(GUI)" == "WNT"
193ALLTAR: $(MISC)$/$(TARGET).exe.manifest
194ALLTAR: $(MISC)$/$(TARGET).bin.manifest
195ALLTAR: $(BIN)$/$(TARGET).bin
196.IF "$(LINK_SO)"=="TRUE"
197ALLTAR: $(BIN)$/so$/$(TARGET).bin
198.ENDIF # "$(LINK_SO)"=="TRUE"
199.ENDIF # WNT
200
201.IF "$(GUI)" == "OS2"
202ALLTAR: $(BIN)$/$(TARGET).bin
203.ENDIF # OS2
204
205$(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN)
206	$(COPY) $< $@
207
208.IF "$(GUI)" != "OS2"
209.IF "$(LINK_SO)"=="TRUE"
210$(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN)
211	$(COPY) $< $@
212
213ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST)
214.ENDIF # "$(LINK_SO)"=="TRUE"
215ALLTAR : $(BIN)$/soffice_oo$(EXECPOST)
216.ENDIF
217
218.IF "$(OS)" == "MACOSX"
219.IF "$(LINK_SO)"=="TRUE"
220$(BIN)$/so$/soffice_mac$(EXECPOST) : $(APP1TARGETN)
221	$(COPY) $< $@
222
223ALLTAR : $(BIN)$/so$/soffice_mac$(EXECPOST)
224.ENDIF # "$(LINK_SO)"=="TRUE"
225
226$(BIN)$/soffice_mac$(EXECPOST) : $(APP5TARGETN)
227	$(COPY) $< $@
228
229ALLTAR : $(BIN)$/soffice_mac$(EXECPOST)
230
231.ENDIF # "$(OS)" == "MACOSX"
232
233.IF "$(GUI)" == "WNT"
234
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) $< $@
243
244$(MISC)$/$(TARGET).exe.linker.manifest: $(BIN)$/$(TARGET)$(EXECPOST)
245   mt.exe -inputresource:$(BIN)$/$(TARGET)$(EXECPOST) -out:$@
246
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
250
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
260
261$(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
262   $(COPY) $< $@
263
264$(BIN)$/so$/$(TARGET).bin: $(BIN)$/so$/$(TARGET)$(EXECPOST)
265   $(COPY) $< $@
266
267.ENDIF # WNT
268
269.IF "$(GUI)" == "OS2"
270$(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
271   $(COPY) $< $@
272.ENDIF # OS2
273
274$(MISC)$/binso_created.flg :
275	@@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@
276
277.ENDIF
278