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,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ 339 $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ 340 $(PCHOBJS))) && \ 341 $(if $(DLLTARGET), echo EXPORTS >> $(DLLDEF) &&) \ 342 $(if $(DLLTARGET), emxexp @$${RESPONSEFILE} | fix_exp_file | sort | uniq | fix_def_ord >> $(DLLDEF) &&) \ 343 $(gb_LINK) \ 344 $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 345 $(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \ 346 $(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \ 347 $(if $(VERSIONMAP),$(gb_Library_VERSIONMAPFLAG) $(VERSIONMAP)) \ 348 $(T_LDFLAGS) \ 349 @$${RESPONSEFILE} \ 350 $(if $(DLLTARGET), $(DLLDEF)) \ 351 $(NATIVERES) \ 352 $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ 353 $(patsubst %.lib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \ 354 $(patsubst %,-l%,$(EXTERNAL_LIBS)) \ 355 $(LIBS) \ 356 $(if $(DLLTARGET),-o $(DLLTARGET), -o $(1) ); \ 357 RC=$$?; rm $${RESPONSEFILE} \ 358 $(if $(DLLTARGET),; emximp -p2048 -o $(1) $(DLLDEF) ) \ 359 $(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC) 360endef 361 362 363define gb_LinkTarget__command_staticlinklibrary 364$(call gb_Helper_abbreviate_dirs_native,\ 365 mkdir -p $(dir $(1)) && \ 366 RESPONSEFILE=`$(gb_MKTEMP)` && \ 367 echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 368 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 369 $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ 370 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \ 371 $(gb_AR) cru\ 372 $(1) \ 373 @$${RESPONSEFILE}) 374endef 375 376define gb_LinkTarget__command 377$(call gb_Output_announce,$(2),$(true),LNK,4) 378$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2))) 379$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2))) 380$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1))) 381endef 382 383 384# Library class 385 386gb_Library_DEFS := -D_DLL_ 387gb_Library_TARGETTYPEFLAGS := -Zdll 388gb_Library_VERSIONMAPFLAG := -Wl,--version-script 389gb_Library_get_rpath := 390 391gb_Library_SYSPRE := 392gb_Library_PLAINEXT := .lib 393 394gb_Library_PLAINLIBS_NONE += \ 395 stdc++ \ 396 ft2lib \ 397 dl \ 398 freetype \ 399 m \ 400 pthread 401 402gb_Library_LAYER := \ 403 $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 404 $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \ 405 $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \ 406 $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 407 $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 408 $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \ 409 $(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \ 410 $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \ 411 $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 412 $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \ 413 414gb_Library_FILENAMES :=\ 415 $(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) 416 417 418gb_Library_DLLEXT := .dll 419gb_Library_MAJORVER := 420gb_Library_RTEXT := $(gb_Library_DLLEXT) 421ifeq ($(gb_PRODUCT),$(true)) 422gb_Library_STLEXT := stdc++$(gb_Library_DLLEXT) 423else 424gb_Library_STLEXT := stlp45_stldebug$(gb_Library_DLLEXT) 425endif 426gb_Library_OOOEXT := $(gb_Library_DLLEXT) 427gb_Library_UNOEXT := .uno$(gb_Library_DLLEXT) 428gb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT) 429gb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT) 430 431gb_Library_DLLFILENAMES :=\ 432 $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \ 433 $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 434 $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 435 $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 436 $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \ 437 $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \ 438 $(foreach lib,$(gb_Library_STLLIBS),$(lib):$(lib)$(gb_Library_STLEXT)) \ 439 $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 440 $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 441 $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \ 442 443define gb_Library_Library_platform 444$(call gb_LinkTarget_set_dlltarget,$(2),$(3)) 445 446#$(call gb_LinkTarget_set_auxtargets,$(2),\ 447 $(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \ 448 $(3).manifest \ 449 $(call gb_LinkTarget_get_pdbfile,$(2)) \ 450 $(patsubst %.dll,%.pdb,$(3)) \ 451 $(patsubst %.dll,%.ilk,$(3)) \ 452) 453 454$(call gb_Library_get_target,$(1)) \ 455$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) 456 457ifneq ($(ENABLE_CRASHDUMP),) 458$(call gb_Library_get_target,$(1)) \ 459$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS += \ 460 $(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \ 461 $(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \ 462 463$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))),$(patsubst %.dll,%.pdb,$(3)),$(1)) 464$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))),$(patsubst %.dll,%.ilk,$(3)),$(1)) 465endif 466 467$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3),$(1)) 468 469$(call gb_LinkTarget_get_target,$(2)) \ 470$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) 471 472endef 473 474define gb_Library_add_default_nativeres_DISABLED 475$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) 476$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) 477$(call gb_WinResTarget_set_defs,$(1)/$(2),\ 478 $$(DEFS) \ 479 -DADDITIONAL_VERINFO1 \ 480 -DADDITIONAL_VERINFO2 \ 481 -DADDITIONAL_VERINFO3 \ 482) 483$(call gb_Library_add_nativeres,$(1),$(2)) 484$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) 485 486endef 487 488define gb_Library_add_nativeres 489$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) 490$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) 491 492endef 493 494define gb_Library_get_dllname 495$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) 496endef 497 498 499# StaticLibrary class 500 501gb_StaticLibrary_DEFS := 502gb_StaticLibrary_SYSPRE := 503gb_StaticLibrary_PLAINEXT := .lib 504gb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 505 506gb_StaticLibrary_FILENAMES := \ 507 $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 508 $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 509 510gb_StaticLibrary_StaticLibrary_platform = 511 512 513# Executable class 514 515gb_Executable_EXT := .exe 516gb_Executable_TARGETTYPEFLAGS := 517#-RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG 518gb_Executable_get_rpath := 519 520gb_InBuild_Library_Path := $(OUTDIR)/bin 521gb_Augment_Library_Path := PATH="$${PATH}:$(gb_InBuild_Library_Path)" 522 523define gb_Executable_Executable_platform 524#$(call gb_LinkTarget_set_auxtargets,$(2),\ 525# $(patsubst %.exe,%.pdb,$(call gb_LinkTarget_get_target,$(2))) \ 526# $(call gb_LinkTarget_get_pdbfile,$(2)) \ 527# $(call gb_LinkTarget_get_target,$(2)).manifest \ 528#) 529 530#$(call gb_Executable_get_target,$(1)) \ 531#$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_target,$(1)).manifest 532#$(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest,$(1)) 533 534#$(call gb_LinkTarget_get_target,$(2)) \ 535#$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) 536 537endef 538 539# GoogleTest class 540 541gb_GoogleTest_GTESTPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 542gb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT) 543 544define gb_GoogleTest_GoogleTest_platform 545endef 546 547# JunitTest class 548 549define gb_JunitTest_JunitTest_platform 550$(call gb_JunitTest_get_target,$(1)) : DEFS := \ 551 -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(SRCDIR)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/OpenOffice 4/program/soffice.exe}" \ 552 -Dorg.openoffice.test.arg.env=PATH \ 553 -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \ 554 555endef 556 557 558# Ant class 559 560define gb_Ant_add_dependencies 561__ant_out:=$(shell $(gb_Ant_ANTCOMMAND) -Ddependencies.outfile=`cygpath -m $(WORKDIR)/Ant/$(1)/deps` -f `cygpath -m $(2)` dependencies) 562$$(eval $(foreach dep,$(shell cat $(WORKDIR)/Ant/$(1)/deps),$$(call gb_Ant_add_dependency,$(call gb_Ant_get_target,$(1)),$(shell cygpath -u $(dep))))) 563 564endef 565 566 567# SdiTarget class 568 569gb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 570 571# SrsPartMergeTarget 572 573gb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 574 575# SrsPartTarget class 576 577gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe 578gb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 579 580ifeq ($(gb_FULLDEPS),$(true)) 581define gb_SrsPartTarget__command_dep 582$(call gb_Helper_abbreviate_dirs_native,\ 583 $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 584 $(INCLUDE) \ 585 $(DEFS) \ 586 $(2) \ 587 -f - \ 588 | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 589 -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \ 590 -v OUTDIR=$(OUTDIR)/ \ 591 -v WORKDIR=$(WORKDIR)/ \ 592 -v SRCDIR=$(SRCDIR)/ \ 593 -v REPODIR=$(REPODIR)/ \ 594 > $(call gb_SrsPartTarget_get_dep_target,$(1))) 595endef 596else 597gb_SrsPartTarget__command_dep = 598endif 599 600# WinResTarget class 601 602gb_WinResTarget_POSTFIX :=.res 603 604define gb_WinResTarget__command 605$(call gb_Output_announce,$(2),$(true),RES,3) 606$(call gb_Helper_abbreviate_dirs_native,\ 607 mkdir -p $(dir $(1)) && \ 608 $(gb_RC) \ 609 $(DEFS) $(FLAGS) \ 610 -I$(dir $(3)) \ 611 $(INCLUDE) \ 612 -fo=$(1) \ 613 -r $(RCFILE) ) 614endef 615 616$(eval $(call gb_Helper_make_dep_targets,\ 617 WinResTarget \ 618)) 619 620ifeq ($(gb_FULLDEPS),$(true)) 621define gb_WinResTarget__command_dep 622$(call gb_Helper_abbreviate_dirs_native,\ 623 $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 624 $(INCLUDE) \ 625 $(DEFS) \ 626 $(2) \ 627 -f - \ 628 | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 629 -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ 630 -v OUTDIR=$(OUTDIR)/ \ 631 -v WORKDIR=$(WORKDIR)/ \ 632 -v SRCDIR=$(SRCDIR)/ \ 633 -v REPODIR=$(REPODIR)/ \ 634 > $(call gb_WinResTarget_get_dep_target,$(1))) 635endef 636else 637gb_WinResTarget__command_dep = 638endif 639 640# ComponentTarget 641 642gb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 643gb_Library_COMPONENTPREFIXES := \ 644 OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 645 URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 646 NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \ 647 648# UnoApiTarget 649 650gb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe 651gb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET) 652gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe 653gb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET) 654gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe 655gb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET) 656gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe 657gb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET) 658gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe 659gb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET) 660 661# vim: set noet sw=4 ts=4: 662