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