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