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