xref: /aoo42x/main/solenv/gbuild/platform/os2.mk (revision 386ca866)
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
22GUI := OS2
23COM := GCC
24
25# set tmpdir to some mixed case path, suitable for native tools
26#gb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp))
27#gb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
28gb_MKTEMP := mktemp -t gbuild.XXXXXX
29
30gb_CC := gcc
31gb_CXX := g++
32gb_GCCP := gcc
33gb_LINK := gcc
34gb_AR := emxomfar
35gb_AWK := awk
36gb_CLASSPATHSEP := ;
37gb_RC := wrc
38
39# use CC/CXX if they are nondefaults
40ifneq ($(origin CC),default)
41gb_CC := $(CC)
42gb_GCCP := $(CC)
43endif
44ifneq ($(origin CXX),default)
45gb_CXX := $(CXX)
46endif
47
48# until we get a solution to libc ticket#251, use dmik's -q option.
49EMXOMFOPT = -q
50export EMXOMFOPT
51
52gb_OSDEFS := \
53	-D$(OS) \
54	-D_PTHREADS \
55	-DOS2 \
56	$(PTHREAD_CFLAGS) \
57
58gb_COMPILERDEFS := \
59	-D$(COM) \
60	-DHAVE_GCC_VISIBILITY_FEATURE \
61	-DCPPU_ENV=$(COMNAME) \
62
63gb_CPUDEFS := -DINTEL -D_X86_=1 -DX86
64
65gb_RCDEFS := \
66	-DOS2 \
67	-bt=os2 \
68	-i$(PATH_EMXPGCC)\include \
69
70gb_RCFLAGS := \
71     -V
72
73gb_CFLAGS := \
74	-Zomf \
75	-Wall \
76	-Wendif-labels \
77	-Wextra \
78	-Wshadow \
79	-fmessage-length=0 \
80	-fno-common \
81	-fno-strict-aliasing \
82	-I$(JAVA_HOME)/include \
83	-I$(JAVA_HOME)/include/os2
84
85gb_CXXFLAGS := \
86	-Zomf \
87	-Wall \
88	-Wendif-labels \
89	-Wextra \
90	-Wno-ctor-dtor-privacy \
91	-Wno-non-virtual-dtor \
92	-Wshadow \
93	-fmessage-length=0 \
94	-fno-common \
95	-fno-strict-aliasing \
96	-fno-use-cxa-atexit \
97	-I$(JAVA_HOME)/include \
98	-I$(JAVA_HOME)/include/os2
99
100gb_STDLIBS = \
101	z \
102	stdc++
103
104ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
105gb_CFLAGS_WERROR := -Werror
106gb_CXXFLAGS_WERROR := -Werror
107endif
108
109gb_LinkTarget_EXCEPTIONFLAGS := \
110	-DEXCEPTIONS_ON \
111	-fexceptions \
112	-fno-enforce-eh-specs \
113
114gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
115
116gb_LinkTarget_NOEXCEPTIONFLAGS := \
117	-DEXCEPTIONS_OFF \
118	-fno-exceptions \
119
120gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
121
122
123gb_LinkTarget_LDFLAGS := \
124	-g -Zomf \
125	-Zhigh-mem \
126	-Zlinker "DISABLE 1121" \
127	-Zmap \
128	-lcx \
129	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
130	$(subst -L../lib , ,$(SOLARLIB)) \
131
132ifneq ($(ENABLE_CRASHDUMP),)
133gb_LinkTarget_LDFLAGS += -DEBUG
134gb_CFLAGS+=-Zi
135gb_CXXFLAGS+=-Zi
136endif
137
138ifeq ($(gb_DEBUGLEVEL),2)
139gb_COMPILEROPTFLAGS := -O0
140gb_COMPILEROPT1FLAGS := -O0
141#gb_LinkTarget_LDFLAGS += -DEBUG
142else
143gb_COMPILEROPTFLAGS := -Os
144gb_COMPILEROPT1FLAGS := -O1
145endif
146
147gb_COMPILERNOOPTFLAGS := -O0
148
149
150# Helper class
151
152gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
153
154# convert parametters filesystem root to native notation
155# does some real work only on windows, make sure not to
156# break the dummy implementations on unx*
157define gb_Helper_convert_native
158$(1)
159endef
160
161
162# CObject class
163
164# $(call gb_CObject__command,object,relative-source,source,dep-file)
165define gb_CObject__command
166$(call gb_Output_announce,$(2),$(true),C  ,3)
167$(call gb_Helper_abbreviate_dirs,\
168	mkdir -p $(dir $(1)) $(dir $(4)) && \
169	$(gb_CC) \
170		$(DEFS) \
171		$(T_CFLAGS) \
172		$(CFLAGS) \
173		-c $(3) \
174		-o $(1) \
175		-MMD -MT $(1) \
176		-MF $(4) \
177		-I$(dir $(3)) \
178		$(INCLUDE))
179endef
180
181
182# CxxObject class
183
184# $(call gb_CxxObject__command,object,relative-source,source,dep-file)
185define gb_CxxObject__command
186$(call gb_Output_announce,$(2),$(true),CXX,3)
187$(call gb_Helper_abbreviate_dirs,\
188	mkdir -p $(dir $(1)) $(dir $(4)) && \
189	$(gb_CXX) \
190		$(DEFS) \
191		$(T_CXXFLAGS) \
192		$(CXXFLAGS) \
193		-c $(3) \
194		-o $(1) \
195		-MMD -MT $(1) \
196		-MF $(4) \
197		-I$(dir $(3)) \
198		$(INCLUDE_STL) $(INCLUDE))
199endef
200
201
202# PrecompiledHeader class
203
204gb_PrecompiledHeader_get_enableflags = -DPRECOMPILED_HEADERS -Yu$(1).hxx \
205									   -Fp$(call gb_PrecompiledHeader_get_target,$(1))
206
207ifeq ($(gb_FULLDEPS),$(true))
208define gb_PrecompiledHeader__command_deponcompile
209$(call gb_Helper_abbreviate_dirs_native,\
210	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
211		$(4) $(5) \
212		-I$(dir $(3)) \
213		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
214		$(3) \
215		-f - \
216	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
217		-v OBJECTFILE=$(1) \
218		-v OUTDIR=$(OUTDIR)/ \
219		-v WORKDIR=$(WORKDIR)/ \
220		-v SRCDIR=$(SRCDIR)/ \
221		-v REPODIR=$(REPODIR)/ \
222	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
223endef
224else
225gb_PrecompiledHeader__command_deponcompile =
226endif
227
228
229define gb_PrecompiledHeader__command
230$(call gb_Output_announce,$(2),$(true),PCH,1)
231$(call gb_Helper_abbreviate_dirs_native,\
232	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
233	unset INCLUDE && \
234	$(gb_CXX) \
235		$(4) $(5) -Fd$(PDBFILE) \
236		-I$(dir $(3)) \
237		$(6) \
238		-c $(3) \
239		-DPRECOMPILED_HEADERS \
240		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
241$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
242endef
243
244# NoexPrecompiledHeader class
245
246gb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx \
247										   -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1))
248
249ifeq ($(gb_FULLDEPS),$(true))
250define gb_NoexPrecompiledHeader__command_deponcompile
251$(call gb_Helper_abbreviate_dirs_native,\
252	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
253		$(4) $(5) \
254		-I$(dir $(3)) \
255		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
256		$(3) \
257		-f - \
258	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
259		-v OBJECTFILE=$(1) \
260		-v OUTDIR=$(OUTDIR)/ \
261		-v WORKDIR=$(WORKDIR)/ \
262		-v SRCDIR=$(SRCDIR)/ \
263		-v REPODIR=$(REPODIR)/ \
264	> $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
265endef
266else
267gb_NoexPrecompiledHeader__command_deponcompile =
268endif
269
270
271define gb_NoexPrecompiledHeader__command
272$(call gb_Output_announce,$(2),$(true),PCH,1)
273$(call gb_Helper_abbreviate_dirs_native,\
274	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
275	unset INCLUDE && \
276	$(gb_CXX) \
277		$(4) $(5) -Fd$(PDBFILE) \
278		-I$(dir $(3)) \
279		$(6) \
280		-c $(3) \
281		-DPRECOMPILED_HEADERS \
282		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
283$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
284endef
285
286# LinkTarget class
287
288gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
289gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
290ifeq ($(ENABLE_SYMBOLS),SMALL)
291gb_DEBUG_CFLAGS := -g1
292else
293gb_DEBUG_CFLAGS := -g3
294endif
295
296gb_LinkTarget_INCLUDE :=\
297	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
298	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
299
300gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
301
302gb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
303
304DLLBASE = $(notdir $(DLLTARGET:.dll=))
305DLLDEF = $(dir $(DLLTARGET))$(DLLBASE).def
306
307define gb_LinkTarget__command_dynamiclinkexecutable
308$(call gb_Output_announce,$(2),$(true),LNK,4)
309$(call gb_Helper_abbreviate_dirs_native,\
310	mkdir -p $(dir $(1)) && \
311	rm -f $(1) && \
312	$(if $(DLLTARGET), echo LIBRARY	$(DLLBASE) INITINSTANCE TERMINSTANCE > $(DLLDEF) &&) \
313	$(if $(DLLTARGET), echo DATA MULTIPLE >> $(DLLDEF) &&) \
314	RESPONSEFILE=$(call var2filecr,$(shell $(gb_MKTEMP)),1, \
315	    $(call gb_Helper_convert_native,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
316		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
317		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
318		$(PCHOBJS))) && \
319	$(if $(DLLTARGET), echo EXPORTS >> $(DLLDEF) &&) \
320	$(if $(DLLTARGET), emxexp @$${RESPONSEFILE} | fix_exp_file | sort | uniq | fix_def_ord >> $(DLLDEF) &&) \
321	$(gb_LINK) \
322		$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
323		$(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \
324		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
325		$(if $(VERSIONMAP),$(gb_Library_VERSIONMAPFLAG) $(VERSIONMAP)) \
326		$(T_LDFLAGS) \
327		@$${RESPONSEFILE} \
328		$(if $(DLLTARGET), $(DLLDEF)) \
329		$(NATIVERES) \
330		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
331		$(patsubst %.lib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
332		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
333		$(LIBS) \
334		$(if $(DLLTARGET),-o $(DLLTARGET), -o $(1) ); \
335		RC=$$?; rm $${RESPONSEFILE} \
336	$(if $(DLLTARGET),; emximp -p2048 -o $(1) $(DLLDEF) ) \
337	$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC)
338endef
339
340
341define gb_LinkTarget__command_staticlinklibrary
342$(call gb_Helper_abbreviate_dirs_native,\
343	mkdir -p $(dir $(1)) && \
344	RESPONSEFILE=`$(gb_MKTEMP)` && \
345	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
346		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
347		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
348	$(gb_AR) cru\
349		$(1) \
350		@$${RESPONSEFILE})
351endef
352
353define gb_LinkTarget__command
354$(call gb_Output_announce,$(2),$(true),LNK,4)
355$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
356$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
357$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1)))
358endef
359
360
361# Library class
362
363gb_Library_DEFS := -D_DLL_
364gb_Library_TARGETTYPEFLAGS := -Zdll
365gb_Library_VERSIONMAPFLAG := -Wl,--version-script
366gb_Library_get_rpath :=
367
368gb_Library_SYSPRE :=
369gb_Library_PLAINEXT := .lib
370
371gb_Library_PLAINLIBS_NONE += \
372	stdc++ \
373	ft2lib \
374	dl \
375	freetype \
376	m \
377	pthread
378
379gb_Library_LAYER := \
380	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
381	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \
382	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
383	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
384	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
385	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
386	$(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \
387	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \
388	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
389	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
390
391gb_Library_FILENAMES :=\
392	$(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT))
393
394
395gb_Library_DLLEXT := .dll
396gb_Library_MAJORVER :=
397gb_Library_RTEXT := $(gb_Library_DLLEXT)
398ifeq ($(gb_PRODUCT),$(true))
399gb_Library_STLEXT := stdc++$(gb_Library_DLLEXT)
400else
401gb_Library_STLEXT := stlp45_stldebug$(gb_Library_DLLEXT)
402endif
403gb_Library_OOOEXT := $(gb_Library_DLLEXT)
404gb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
405gb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
406gb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
407
408gb_Library_DLLFILENAMES :=\
409	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
410	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
411	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
412	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
413	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
414	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
415	$(foreach lib,$(gb_Library_STLLIBS),$(lib):$(lib)$(gb_Library_STLEXT)) \
416	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
417	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
418	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
419
420define gb_Library_Library_platform
421$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
422
423#$(call gb_LinkTarget_set_auxtargets,$(2),\
424	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
425	$(3).manifest \
426	$(call gb_LinkTarget_get_pdbfile,$(2)) \
427	$(patsubst %.dll,%.pdb,$(3)) \
428	$(patsubst %.dll,%.ilk,$(3)) \
429)
430
431$(call gb_Library_get_target,$(1)) \
432$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
433
434ifneq ($(ENABLE_CRASHDUMP),)
435$(call gb_Library_get_target,$(1)) \
436$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS +=  \
437		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \
438		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \
439
440$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))),$(patsubst %.dll,%.pdb,$(3)),$(1))
441$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))),$(patsubst %.dll,%.ilk,$(3)),$(1))
442endif
443
444$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3),$(1))
445
446$(call gb_LinkTarget_get_target,$(2)) \
447$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
448
449endef
450
451define gb_Library_add_default_nativeres_DISABLED
452$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2))
453$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo)
454$(call gb_WinResTarget_set_defs,$(1)/$(2),\
455        $$(DEFS) \
456		-DADDITIONAL_VERINFO1 \
457		-DADDITIONAL_VERINFO2 \
458		-DADDITIONAL_VERINFO3 \
459)
460$(call gb_Library_add_nativeres,$(1),$(2))
461$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2))
462
463endef
464
465define gb_Library_add_nativeres
466$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
467$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
468
469endef
470
471define gb_Library_get_dllname
472$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
473endef
474
475
476# StaticLibrary class
477
478gb_StaticLibrary_DEFS :=
479gb_StaticLibrary_SYSPRE :=
480gb_StaticLibrary_PLAINEXT := .lib
481gb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
482
483gb_StaticLibrary_FILENAMES := \
484	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
485	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
486
487gb_StaticLibrary_StaticLibrary_platform =
488
489
490# Executable class
491
492gb_Executable_EXT := .exe
493gb_Executable_TARGETTYPEFLAGS :=
494#-RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG
495gb_Executable_get_rpath :=
496
497define gb_Executable_Executable_platform
498#$(call gb_LinkTarget_set_auxtargets,$(2),\
499#	$(patsubst %.exe,%.pdb,$(call gb_LinkTarget_get_target,$(2))) \
500#	$(call gb_LinkTarget_get_pdbfile,$(2)) \
501#	$(call gb_LinkTarget_get_target,$(2)).manifest \
502#)
503
504#$(call gb_Executable_get_target,$(1)) \
505#$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_target,$(1)).manifest
506#$(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest,$(1))
507
508#$(call gb_LinkTarget_get_target,$(2)) \
509#$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
510
511endef
512
513# GoogleTest class
514
515gb_GoogleTest_GTESTPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
516gb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT)
517
518define gb_GoogleTest_GoogleTest_platform
519endef
520
521# JunitTest class
522
523define gb_JunitTest_JunitTest_platform
524$(call gb_JunitTest_get_target,$(1)) : DEFS := \
525	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(SRCDIR)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/OpenOffice 4/program/soffice.exe}" \
526    -Dorg.openoffice.test.arg.env=PATH \
527    -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \
528
529endef
530
531
532# SdiTarget class
533
534gb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
535
536# SrsPartMergeTarget
537
538gb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
539
540# SrsPartTarget class
541
542gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
543gb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
544
545ifeq ($(gb_FULLDEPS),$(true))
546define gb_SrsPartTarget__command_dep
547$(call gb_Helper_abbreviate_dirs_native,\
548	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
549		$(INCLUDE) \
550		$(DEFS) \
551		$(2) \
552		-f - \
553	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
554		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
555		-v OUTDIR=$(OUTDIR)/ \
556		-v WORKDIR=$(WORKDIR)/ \
557		-v SRCDIR=$(SRCDIR)/ \
558		-v REPODIR=$(REPODIR)/ \
559	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
560endef
561else
562gb_SrsPartTarget__command_dep =
563endif
564
565# WinResTarget class
566
567gb_WinResTarget_POSTFIX :=.res
568
569define gb_WinResTarget__command
570$(call gb_Output_announce,$(2),$(true),RES,3)
571$(call gb_Helper_abbreviate_dirs_native,\
572	mkdir -p $(dir $(1)) && \
573	$(gb_RC) \
574		$(DEFS) $(FLAGS) \
575		-I$(dir $(3)) \
576		$(INCLUDE) \
577		-fo=$(1) \
578        -r $(RCFILE) )
579endef
580
581$(eval $(call gb_Helper_make_dep_targets,\
582	WinResTarget \
583))
584
585ifeq ($(gb_FULLDEPS),$(true))
586define gb_WinResTarget__command_dep
587$(call gb_Helper_abbreviate_dirs_native,\
588	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
589		$(INCLUDE) \
590		$(DEFS) \
591		$(2) \
592		-f - \
593	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
594		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
595		-v OUTDIR=$(OUTDIR)/ \
596		-v WORKDIR=$(WORKDIR)/ \
597		-v SRCDIR=$(SRCDIR)/ \
598		-v REPODIR=$(REPODIR)/ \
599	> $(call gb_WinResTarget_get_dep_target,$(1)))
600endef
601else
602gb_WinResTarget__command_dep =
603endif
604
605# ComponentTarget
606
607gb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
608gb_Library_COMPONENTPREFIXES := \
609    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
610    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
611    NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \
612
613# UnoApiTarget
614
615gb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe
616gb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
617gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe
618gb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
619gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe
620gb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
621gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe
622gb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
623gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe
624gb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
625
626# vim: set noet sw=4 ts=4:
627