xref: /aoo41x/main/desktop/util/makefile.mk (revision 7871dc3e)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..
25
26PRJNAME=desktop
27TARGET=soffice
28TARGETTYPE=GUI
29LIBTARGET=NO
30GEN_HID=TRUE
31GEN_HID_OTHER=TRUE
32
33# --- Settings -----------------------------------------------------------
34
35.INCLUDE :  settings.mk
36
37UWINAPILIB =
38
39VERINFONAME=verinfo
40
41# --- Resourcen ----------------------------------------------------
42
43.IF "$(GUI)" == "WNT"
44RCFILES=verinfo.rc
45.ENDIF
46.IF "$(GUI)" == "OS2"
47RCFILES=ooverinfo2.rc
48.ENDIF
49
50# --- Linken der Applikation ---------------------------------------
51
52.IF "$(OS)" == "MACOSX"
53LINKFLAGSAPPGUI!:=	$(LINKFLAGSAPPGUI:s/-bind_at_load//)
54.ENDIF # MACOSX
55
56#.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" || "$(OS)" == "NETBSD"
57## #74158# linux needs sal/vos/tools at end of link list, solaris needs it first,
58## winXX is handled like solaris for now
59#APP1_STDPRE=
60#APP1_STDPOST=$(CPPULIB) $(CPPUHELPERLIB) $(UNOLIB) $(TOOLSLIB) \
61#	$(VOSLIB) $(SALLIB)
62#.ELSE
63#APP1_STDPRE=$(SALLIB) $(VOSLIB) $(TOOLSLIB) $(UNOLIB) $(CPPULIB) \
64#	$(CPPUHELPERLIB)
65#APP1_STDPOST=
66#.ENDIF
67
68RESLIB1NAME=		dkt
69RESLIB1IMAGES=		$(PRJ)$/res
70RESLIB1SRSFILES=	$(SRS)$/desktop.srs \
71                    $(SRS)$/wizard.srs
72
73.IF "$(L10N_framework)"==""
74.IF "$(LINK_SO)"=="TRUE"
75.IF "$(GUI)" != "OS2"
76APP1TARGET=so$/$(TARGET)
77APP1NOSAL=TRUE
78APP1RPATH=BRAND
79APP1OBJS=$(OBJ)$/copyright_ascii_sun.obj $(OBJ)$/main.obj
80APP1STDLIBS = $(SALLIB) $(SOFFICELIB)
81APP1DEPN= $(APP1RES) verinfo.rc
82
83.IF "$(GUI)" == "WNT"
84APP1RES=    $(RES)$/desktop.res
85APP1ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
86APP1VERINFO=verinfo.rc
87APP1LINKRES=$(MISC)$/$(TARGET)1.res
88APP1STACK=10000000
89
90# create a manifest file with the same name as the
91#office executable file soffice.exe.manifest
92#$(BIN)$/$(TARGET).exe.manifest: template.manifest
93#$(COPY) $< $@
94
95.ENDIF # WNT
96
97.ENDIF # "$(GUI)" != "OS2"
98
99.ENDIF # "$(LINK_SO)"=="TRUE"
100
101APP5TARGET=soffice
102APP5NOSAL=TRUE
103APP5RPATH=BRAND
104APP5OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/main.obj
105APP5STDLIBS = $(SALLIB) $(SOFFICELIB)
106.IF "$(OS)" == "LINUX"
107APP5STDLIBS+= -lXext -lX11
108#APP5STDLIBS+= -lXext -lSM -lICE
109.ENDIF # LINUX
110
111APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
112APP5DEF=    $(MISCX)$/$(TARGET).def
113
114.IF "$(GUI)" == "WNT"
115APP5RES=    $(RES)$/oodesktop.res
116APP5ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
117APP5VERINFO=ooverinfo.rc
118APP5LINKRES=$(MISC)$/ooffice5.res
119APP5STACK=10000000
120.ENDIF # WNT
121
122.IF "$(GUI)" == "OS2"
123APP5DEF= # automatic
124APP5RES=    $(RES)$/oodesktop.res
125APP5ICON=$(SOLARRESDIR)$/icons/ooo-main-app.ico
126APP5VERINFO=ooverinfo2.rc
127APP5LINKRES=$(MISC)$/ooffice.res
128.ENDIF # OS2
129
130.IF "$(GUI)" == "WNT"
131.IF "$(LINK_SO)"=="TRUE"
132APP6TARGET=so$/officeloader
133APP6RES=$(RES)$/soloader.res
134APP6NOSAL=TRUE
135APP6DEPN= $(APP1TARGETN) $(APP6RES) verinfo.rc
136APP6VERINFO=verinfo.rc
137APP6LINKRES=$(MISC)$/soffice6.res
138APP6ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
139APP6OBJS = \
140    $(OBJ)$/extendloaderenvironment.obj \
141    $(OBJ)$/officeloader.obj \
142    $(SOLARLIBDIR)$/pathutils-obj.obj
143STDLIB6=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB)
144.ENDIF # "$(LINK_SO)"=="TRUE"
145
146APP7TARGET=officeloader
147APP7RES=$(RES)$/ooloader.res
148APP7NOSAL=TRUE
149APP7DEPN= $(APP1TARGETN) $(APP7RES) ooverinfo.rc
150APP7VERINFO=ooverinfo.rc
151APP7LINKRES=$(MISC)$/ooffice7.res
152APP7ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
153APP7OBJS = \
154    $(OBJ)$/extendloaderenvironment.obj \
155    $(OBJ)$/officeloader.obj \
156    $(SOLARLIBDIR)$/pathutils-obj.obj
157STDLIB7=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB)
158.ELIF "$(OS)" == "MACOSX"
159APP6TARGET=officeloader
160APP6NOSAL=TRUE
161APP6RPATH=BRAND
162APP6OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/officeloader.obj
163APP6STDLIBS = $(SALLIB)
164APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
165APP5DEF=    $(MISCX)$/$(TARGET).def
166.ENDIF # WNT
167
168.ENDIF
169
170# --- Targets -------------------------------------------------------------
171
172.INCLUDE :  target.mk
173
174.IF "$(L10N_framework)"==""
175
176.IF "$(APP1TARGETN)"!=""
177$(APP1TARGETN) :  $(MISC)$/binso_created.flg
178.ENDIF			# "$(APP1TARGETN)"!=""
179
180.IF "$(APP5TARGETN)"!=""
181$(APP5TARGETN) :  $(MISC)$/binso_created.flg
182.ENDIF			# "$(APP6TARGETN)"!=""
183
184.IF "$(APP6TARGETN)"!=""
185$(APP6TARGETN) :  $(MISC)$/binso_created.flg
186.ENDIF			# "$(APP6TARGETN)"!=""
187
188.IF "$(GUI)" == "WNT"
189ALLTAR: $(MISC)$/$(TARGET).exe.manifest
190ALLTAR: $(MISC)$/$(TARGET).bin.manifest
191ALLTAR: $(BIN)$/$(TARGET).bin
192.IF "$(LINK_SO)"=="TRUE"
193ALLTAR: $(BIN)$/so$/$(TARGET).bin
194.ENDIF # "$(LINK_SO)"=="TRUE"
195.ENDIF # WNT
196
197.IF "$(GUI)" == "OS2"
198ALLTAR: $(BIN)$/$(TARGET).bin
199.ENDIF # OS2
200
201$(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN)
202	$(COPY) $< $@
203
204.IF "$(GUI)" != "OS2"
205.IF "$(LINK_SO)"=="TRUE"
206$(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN)
207	$(COPY) $< $@
208
209ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST)
210.ENDIF # "$(LINK_SO)"=="TRUE"
211ALLTAR : $(BIN)$/soffice_oo$(EXECPOST)
212.ENDIF
213
214.IF "$(OS)" == "MACOSX"
215.IF "$(LINK_SO)"=="TRUE"
216$(BIN)$/so$/soffice_mac$(EXECPOST) : $(APP1TARGETN)
217	$(COPY) $< $@
218
219ALLTAR : $(BIN)$/so$/soffice_mac$(EXECPOST)
220.ENDIF # "$(LINK_SO)"=="TRUE"
221
222$(BIN)$/soffice_mac$(EXECPOST) : $(APP5TARGETN)
223	$(COPY) $< $@
224
225ALLTAR : $(BIN)$/soffice_mac$(EXECPOST)
226
227.ENDIF # "$(OS)" == "MACOSX"
228
229.IF "$(GUI)" == "WNT"
230
231# create a manifest file with the same name as the
232# office executable file soffice.exe.manifest
233.IF "$(CCNUMVER)" <= "001399999999"
234$(MISC)$/$(TARGET).exe.manifest: template.manifest
235   $(COPY) $< $@
236.ELSE
237$(MISC)$/$(TARGET).exe.template.manifest: template.manifest
238   $(COPY) $< $@
239
240$(MISC)$/$(TARGET).exe.linker.manifest: $(BIN)$/$(TARGET)$(EXECPOST)
241   mt.exe -inputresource:$(BIN)$/$(TARGET)$(EXECPOST) -out:$@
242
243$(MISC)$/$(TARGET).exe.manifest: $(MISC)$/$(TARGET).exe.template.manifest $(MISC)$/$(TARGET).exe.linker.manifest
244   mt.exe -manifest $(MISC)$/$(TARGET).exe.linker.manifest $(MISC)$/$(TARGET).exe.template.manifest -out:$@
245.ENDIF
246
247# create a manifest file with the same name as the
248# office executable file soffice.bin.manifest
249.IF "$(CCNUMVER)" <= "001399999999"
250$(MISC)$/$(TARGET).bin.manifest: template.manifest
251   $(COPY) $< $@
252.ELSE
253$(MISC)$/$(TARGET).bin.manifest: $(MISC)$/$(TARGET).exe.manifest
254   $(COPY) $(MISC)$/$(TARGET).exe.manifest $@
255.ENDIF
256
257$(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
258   $(COPY) $< $@
259
260$(BIN)$/so$/$(TARGET).bin: $(BIN)$/so$/$(TARGET)$(EXECPOST)
261   $(COPY) $< $@
262
263.ENDIF # WNT
264
265.IF "$(GUI)" == "OS2"
266$(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
267   $(COPY) $< $@
268.ENDIF # OS2
269
270$(MISC)$/binso_created.flg :
271	@@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@
272
273.ENDIF
274