1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829
|
# -*- Makefile -*-
#----------------------------------------------------------------------------
# GNU Makefile
#
# @file <%project_file%>
#
# $Id: gnu.mpd 93117 2011-01-20 12:11:28Z mcorino $
#
# This file was automatically generated by MPC. Any changes made directly to
# this file will be lost the next time it is generated.
#
#----------------------------------------------------------------------------
<%marker(top)%>
MAKEFILE = <%project_file%>
DEPENDENCY_FILE = .depend.<%project_name%>
<%if(exename)%>
BIN_UNCHECKED = <%exename%>
<%endif%>
LIB_PREFIX ?= lib
<%if(need_staticflags)%>
static_libs_only ?= 1
<%endif%>
<%if(staticname)%>
## LIB_CHECKED may be set to empty later on in this file
LIB_UNCHECKED = $(LIB_PREFIX)<%libname_prefix%><%staticname%>.$(LIBEXT)
LIB_CHECKED = $(LIB_UNCHECKED)
LIB_NAME = $(LIB_PREFIX)<%libname_prefix%><%staticname%>
<%if(!sharedname)%>
static_libs_only = 1
<%endif%>
<%endif%>
<%if(sharedname)%>
## SHLIB may be set to empty later on in this file
SHLIB_UNCHECKED = $(LIB_PREFIX)<%libname_prefix%><%sharedname%>.$(SOEXT)
SHLIB = $(SHLIB_UNCHECKED)
<%endif%>
<%if(tao || ciao || dance)%>
TAO_ROOT ?= $(ACE_ROOT)/TAO
<%if(ciao)%>
CIAO_ROOT ?= $(TAO_ROOT)/CIAO
<%endif%>
<%if(dance)%>
DANCE_ROOT ?= $(TAO_ROOT)/DAnCE
<%endif%>
<%endif%>
<%if(grouped_source_files)%>
<%foreach(grouped_source_files)%>
<%grouped_source_file%> = \
<%foreach(grouped_source_file->files)%>
<%grouped_source_file->file%><%fornotlast(" \\")%>
<%endfor%>
<%endfor%>
FILES += \
<%foreach(grouped_source_files)%>
$(<%grouped_source_file%>)<%fornotlast(" \\")%>
<%endfor%>
<%else%>
FILES = \
<%foreach(source_files)%>
<%source_file%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%vpath%>
#----------------------------------------------------------------------------
# Include macros and targets
#----------------------------------------------------------------------------
<%marker(macros)%>
<%if(xerceslib)%>
XERCESLIB ?= <%xerceslib%>
<%endif%>
<%if(exename)%>
LDLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
<%else%>
<%if(sharedname)%>
ACE_SHLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
<%endif%>
<%endif%>
<%if(tao_idl)%>
TAO_IDL = <%tao_idl%>
<%endif%>
<%if(tao_idl_dep)%>
TAO_IDL_DEP = <%tao_idl_dep%>$(EXEEXT)
<%endif%>
<%if(tao_idlflags)%>
TAO_IDLFLAGS = <%tao_idlflags%><%if(!compares(vms_old_make, 1))%>$(if $(ARCH), -g $(call ADD_QUOTE,$(call ADD_ARCH,$(ACE_ROOT)/bin/ace_gperf)))<%endif%>
<%endif%>
<%if(cidlc)%>
CIDLC = <%cidlc%>
<%endif%>
<%if(cidlc_dep)%>
CIDLC_DEP = <%cidlc_dep%>$(EXEEXT)
<%endif%>
<%if(cidlc_flags)%>
CIDLC_FLAGS = <%cidlc_flags%>
<%endif%>
<%if(xsc_bin)%>
XSC_BIN = <%xsc_bin%>
<%endif%>
<%if(xsc_dep)%>
XSC_DEP = <%xsc_dep%>$(EXEEXT)
<%endif%>
<%if(xsc_flags)%>
XSC_FLAGS = <%xsc_flags%>
<%endif%>
<%if(tao_idl3_to_idl2)%>
TAO_IDL3_TO_IDL2 = <%tao_idl3_to_idl2%>
<%endif%>
<%if(tao_idl3_to_idl2_dep)%>
TAO_IDL3_TO_IDL2_DEP = <%tao_idl3_to_idl2_dep%>$(EXEEXT)
<%endif%>
<%if(tao_idl3_to_xmi)%>
TAO_IDL3_TO_XMI = <%tao_idl3_to_xmi%>
<%endif%>
<%if(tao_idl3_to_xmi_dep)%>
TAO_IDL3_TO_XMI_DEP = <%tao_idl3_to_xmi_dep%>$(EXEEXT)
<%endif%>
<%if(exename)%>
PRJ_TYPE = rtp
<%else%>
PRJ_TYPE = library
<%endif%>
<%if(exename)%>
<%if(install)%>
COLLAPSE_SLASHES = $(if $(findstring //,$(1)),$(call COLLAPSE_SLASHES,$(subst //,/,$(1))),$(1))
INSBIN ?= <%if(compares(vms_old_make, 1))%><%install%><%else%>$(call COLLAPSE_SLASHES,<%install%>)<%endif%>
<%endif%>
ifeq ($(INSBIN),.)
ifeq ($(CURDIR),)
ifeq ($(PWD),)
PWD=$(shell pwd)
endif
else
PWD=$(CURDIR)
endif
INSBIN = $(PWD)<%if(targetoutdir)%>/<%targetoutdir%><%endif%>
<%if(targetoutdir)%>
else
ifneq ($(INSBIN),)
INSBIN := $(INSBIN)/<%targetoutdir%>
endif
<%endif%>
endif
<%if(install)%>
OUTPUT_DIRECTORY = $(if $(ARCH),$(if $(INSBIN),$(INSBIN)/$(ARCH)),$(INSBIN))
<%else%>
OUTPUT_DIRECTORY = $(if $(ARCH),./$(ARCH))
<%endif%>
<%else%>
<%if(dllout || libout)%>
COLLAPSE_SLASHES = $(if $(findstring //,$(1)),$(call COLLAPSE_SLASHES,$(subst //,/,$(1))),$(1))
INSLIB ?= <%if(compares(vms_old_make, 1))%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%else%>$(call COLLAPSE_SLASHES,<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>)<%endif%>
<%endif%>
ifeq ($(INSLIB),.)
ifeq ($(CURDIR),)
ifeq ($(PWD),)
PWD=$(shell pwd)
endif
else
PWD=$(CURDIR)
endif
INSLIB = $(PWD)<%if(targetoutdir)%>/<%targetoutdir%><%endif%>
<%if(targetoutdir)%>
else
INSLIB := $(INSLIB)/<%targetoutdir%>
<%endif%>
endif
OUTPUT_DIRECTORY = $(INSLIB)
<%endif%>
<%if(targetoutdir)%>
VDIR = <%targetoutdir%>.obj/
VSHDIR = <%targetoutdir%>.shobj/
<%endif%>
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
<%marker(extension)%>
<%if(ciao)%>
include $(CIAO_ROOT)/rules.ciao.GNU
<%endif%>
<%if(dance)%>
include $(DANCE_ROOT)/rules.dance.GNU
<%endif%>
<%if(tao)%>
include $(TAO_ROOT)/rules.tao.GNU
<%endif%>
<%if(version)%>
GNUACE_PROJECT_VERSION = <%version%>
<%else%>
GNUACE_PROJECT_VERSION ?= $(ACE_VERSION)
<%endif%>
<%if(resource_files)%>
ifneq (,$(RC))
RESOURCES += \
<%foreach(resource_files)%>
<%resource_file%><%fornotlast(" \\")%>
<%endfor%>
<%if(includes)%>
RC_INCLUDE_FLAG ?= --include-dir=
RCFLAGS = \
<%foreach(includes)%>
$(RC_INCLUDE_FLAG)<%include%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
endif
<%endif%>
# To build multiple targets in the same directory on AIX, it works
# best to have a template directory per project.
# The compiler/linker isn't too smart about instantiating templates...
ifdef TEMPINCDIR
TEMPINCDIR := $(TEMPINCDIR)/<%project_name%>
all: $(TEMPINCDIR)
endif
ifneq ($(OUTPUT_DIRECTORY),)
.PHONY: create_output_directory.local
all: create_output_directory.local
create_output_directory.local:
-@$(MKDIR) "$(OUTPUT_DIRECTORY)" $(ACE_NUL_STDERR)
endif
<%if(sharedname || staticname || exename)%>
<%if(libs && libpaths)%>
# turn off libcheck if doing a dry run
ifeq ($(findstring n, $(MAKEFLAGS)),n)
LIBCHECK = 1
else
# turn off libcheck if keep going was passed too
ifeq ($(findstring k, $(MAKEFLAGS)),k)
LIBCHECK = 1
else
LIBCHECK ?= $(filter-out $(foreach lib,<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>,$(findstring $(lib),$(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%><%libpath%>/<%targetoutdir%> <%endif%><%libpath%> $(if $(ARCH),<%libpath%>/$(ARCH)) <%endfor%>/usr/lib /usr/lib64 $(INSLIB),$(wildcard $(libpath)/$(LIB_PREFIX)$(lib).* $(libpath)/$(lib).lib)))),<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>)
ifeq ($(LIBCHECK),)
LIBCHECK = 1
endif
endif
endif
<%else%>
LIBCHECK = 1
<%endif%>
<%else%>
LIBCHECK = 1
<%endif%>
<%if(!exename)%>
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
ifneq ($(LIBCHECK), 1)
<%if(staticname)%>
LIB_CHECKED =
<%endif%>
<%if(sharedname)%>
SHLIB =
<%endif%>
all: lib_warning
endif
<%foreach(avoids)%>
else
<%if(staticname)%>
LIB_CHECKED =
<%endif%>
<%if(sharedname)%>
SHLIB =
<%endif%>
all: avoid_warning
endif
<%endfor%>
<%foreach(requires)%>
else
<%if(staticname)%>
LIB_CHECKED =
<%endif%>
<%if(sharedname)%>
SHLIB =
<%endif%>
all: require_warning
endif
<%endfor%>
<%if(tagname)%>
ifeq (,$(<%tagname%>))
<%endif%>
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
<%foreach(avoids)%>
else
<%if(staticname)%>
LIB_CHECKED =
<%endif%>
<%if(sharedname)%>
SHLIB =
<%endif%>
all: avoid_warning
endif
<%endfor%>
<%foreach(requires)%>
else
<%if(staticname)%>
LIB_CHECKED =
<%endif%>
<%if(sharedname)%>
SHLIB =
<%endif%>
all: require_warning
endif
<%endfor%>
<%if(tagname)%>
else
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
<%foreach(tagchecks)%>
ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>)))
<%endfor%>
<%foreach(tagchecks)%>
else
LIB_CHECKED =
SHLIB =
endif
<%endfor%>
<%foreach(avoids)%>
else
LIB_CHECKED =
SHLIB =
all: avoid_warning
endif
<%endfor%>
<%foreach(requires)%>
else
LIB_CHECKED =
SHLIB =
all: require_warning
endif
<%endfor%>
endif
<%endif%>
<%endif%>
<%if(exename)%>
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
ifeq ($(LIBCHECK), 1)
BIN = $(BIN_UNCHECKED)$(EXEEXT)
ifdef ARCH
ARCH_BIN = $(ARCH)/$(BIN)
endif #ARCH
else
all: lib_warning
endif
<%foreach(avoids)%>
else
all: avoid_warning
endif
<%endfor%>
<%foreach(requires)%>
else
all: require_warning
endif
<%endfor%>
# If it contains ../ at all use notdir.
OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var)))
SRC = $(FILES)
<%endif%>
<%if(sharedname || staticname)%>
LSRC = $(FILES)
<%endif%>
<%marker(circuit)%>
include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
<%if(exename)%>
ifneq ($(INSBIN),)
ifneq ($(INSBIN),.)
INSTALL = $(VBIN:%=$(INSBIN)/%)
CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/$(if $(ARCH),$(ARCH)/)%$(VAR)$(EXEEXT))
endif
endif
<%endif%>
<%if(sharedname || staticname)%>
include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
<%endif%>
<%if(pch_source)%>
ACE_PCH_SOURCE = <%pch_source%>
ACE_PCH_FILE = <%basename(pch_header)%>.gch
ifeq ($(pchsupport),1)
<%if(pch_defines)%>
CPPFLAGS +=<%foreach(pch_defines)%> -D<%pch_define%><%endfor%>
<%endif%>
$(addprefix $(VDIR), $(OBJS)): $(VDIR)$(ACE_PCH_FILE)
$(VSHOBJS): $(VSHDIR)$(ACE_PCH_FILE)
endif
<%endif%>
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
ifeq ($(VXWORKSLINK),1)
include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE)
endif
<%foreach(source_files)%>
<%if(flag_overrides(source_file, buildflags))%>
$(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
@$(MKDIR) $(VDIR)<%dirname(source_file)%>
<%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
${MVCMD}
ifneq ($(VSHDIR), $(VDIR))
$(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
@$(MKDIR) $(VSHDIR)<%dirname(source_file)%>
<%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
endif
<%else%>
<%if(dirname(source_file) && !contains(source_file, \.\./))%>
<%if(starts_with(source_file, \$) || !ends_with(source_file, \.cpp))%>
$(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
@$(MKDIR) $(VDIR)<%dirname(source_file)%>
<%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
${MVCMD}
ifneq ($(VSHDIR), $(VDIR))
$(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
@$(MKDIR) $(VSHDIR)<%dirname(source_file)%>
<%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
endif
<%endif%>
<%endif%>
<%endif%>
<%endfor%>
<%if(libpaths)%>
ifeq ($(VXWORKSLINK),1)
LDLIBPATH =<%foreach(libpaths)%> <%if(targetoutdir)%>-L<%libpath%>/<%targetoutdir%> <%endif%>-L<%libpath%><%endfor%><%if(linkflags)%> <%linkflags%><%endif%>
else
LDFLAGS +=<%foreach(libpaths)%> <%if(targetoutdir)%>-L<%libpath%>/<%targetoutdir%> <%endif%>-L<%libpath%> $(if $(ARCH),-L<%libpath%>/$(ARCH))<%endfor%><%if(linkflags)%> <%linkflags%><%endif%>
endif
<%endif%>
<%if(includes)%>
CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%>
<%endif%>
<%if(macros)%>
CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%>
<%endif%>
<%if(compile_flags)%>
CPPFLAGS += <%compile_flags%>
<%endif%>
<%if(dynamicflags)%>
ifeq ($(shared_libs),1)
ifneq ($(SHLIB),)
CPPFLAGS +=<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
endif
endif
<%endif%>
<%if(staticflags || exename)%>
ifeq ($(static_libs),1)
<%if(staticflags)%>
CPPFLAGS +=<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
<%endif%>
<%if(exename)%>
ifeq ($(link_groups), 1)
LDLIBS := -Wl,--start-group $(LDLIBS) -Wl,--end-group
endif
<%endif%>
endif
<%endif%>
#----------------------------------------------------------------------------
# Local targets
#----------------------------------------------------------------------------
<%marker(local)%>
lib_warning:
@echo <%project_name%> will not be built due to the following missing library: $(LIBCHECK) >&2
<%if(requires)%>
<%foreach(requires)%>
ifneq ($(<%require%>),1)
requires_disabled_macros += <%require%>
endif
<%endfor%>
require_warning:
@echo <%project_name%> will not be built due to the following disabled make macros: $(requires_disabled_macros)>&2
<%endif%>
<%if(avoids)%>
<%foreach(avoids)%>
ifeq ($(<%avoid%>),1)
avoids_enabled_macros += <%avoid%>
endif
<%endfor%>
avoid_warning:
@echo <%project_name%> will not be built due to the following enabled make macros: $(avoids_enabled_macros)>&2
<%endif%>
<%if(custom_types)%>
## Some OS's have /bin/test others only have /usr/bin/test
ifeq ($(wildcard /bin/test), /bin/test)
TEST_EXE = /bin/test
else
ifeq ($(wildcard /usr/bin/test), /usr/bin/test)
TEST_EXE = /usr/bin/test
endif
endif
SPACE = $(should_be_unset) $(should_be_unset)
<%foreach(custom_types)%>
<%if(custom_type->libpath)%>
DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
LIBPATH := $(LIBPATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
PATH := $(PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
<%endif%>
<%foreach(custom_type->input_files)%>
<%if(custom_type->input_file->output_files)%>
GENERATED_DIRTY +=<%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%>
<%if(custom_type->input_file->non_source_output_files)%>
OBJS_DEPEND_ON_GENERATED = 1
<%endif%>
<%foreach(custom_type->input_file->output_files)%>
<%if(forlast && !forfirst)%>
## More than one file is generated by the command and therefore
## it can not be run in parallel. Unfortunately, there is no way to
## say that only this rule can't be run in parallel. However, we can
## determine if the generated files have already been generated. If that's
## the case, then we don't need this special rule.
ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY))
## If we can find /bin/test, then we will continue
ifneq ($(TEST_EXE),)
## If all of the generated files are there, then we need to check
## and make sure that the generated files are up-to-date. If they are not
## then we need the special rule.
ifeq ($(shell<%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%custom_type->input_file%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%> echo 0),)
.NOTPARALLEL:
<%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)%>
else
## By this point, all of the generated files are here and up-to-date
## with respect to the source file. Now we need to make sure that
## they are up-to-date with respect to the generation tool. If the tool
## is newer than the generated files, then we need the special rule.
ifeq ($(shell<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%endif%><%endif%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%endif%><%endif%> echo 0),)
.NOTPARALLEL:
endif
<%endif%>
endif
else
.NOTPARALLEL:
endif
else
.NOTPARALLEL:
endif
<%endif%>
<%endfor%>
<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%> <%if(contains(custom_type->input_file->dependencie, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%><%custom_type->input_file->dependencie%><%endif%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%if(contains(dep, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%if(contains(custom_type->dependent, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%><%endif%><%endfor%><%endif%><%endif%>
<%if(flag_overrides(custom_type->input_file, gendir))%>
<%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%>
$(MKDIR) <%flag_overrides(custom_type->input_file, gendir)%>
<%endif%>
<%endif%>
<%if(compares(vms_old_make, 1))%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%><%else%>$(if $(findstring ",<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>),<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>,$(call ADD_QUOTE,$(call ADD_ARCH,<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>)))<%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%>
<%if(flag_overrides(custom_type->input_file, postcommand))%>
<%foreach(custom_type->input_file)%>
<%flag_overrides(custom_type->input_file, postcommand)%>
<%endfor%>
<%else%>
<%if(custom_type->postcommand)%>
<%foreach(custom_type->input_file)%>
<%custom_type->postcommand%>
<%endfor%>
<%endif%>
<%endif%>
<%if(pch_header)%>
<%if(custom_type->pch_postrule)%>
<%foreach(custom_type->input_file->source_output_files)%>
@echo '#include "<%pch_header%>"' > temp.$$$$ && cat <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temp.$$$$ && mv temp.$$$$ <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
<%endfor%>
<%endif%>
<%endif%>
<%if(flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)%>
ifneq ($(static_libs_only),1)
ifneq ($(CROSS-COMPILE),1)
<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>:<%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%if(contains(dep_lib, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%> <%if(contains(custom_type->dependent_lib, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%><%endif%><%endfor%><%endif%><%endif%>
endif
endif
<%endif%>
<%endif%>
<%endfor%>
<%endfor%>
ifneq ($(GENERATED_DIRTY),)
.PRECIOUS: $(GENERATED_DIRTY)
<%if(source_files)%>
## If the generated files are anything but source files, we need to
## ensure that those files are generated before we attempt to build anything
## else.
ifeq ($(OBJS_DEPEND_ON_GENERATED),1)
$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY)
$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY)
endif
<%else%>
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
all: $(GENERATED_DIRTY)
<%foreach(avoids)%>
endif
<%endfor%>
<%foreach(requires)%>
endif
<%endfor%>
<%endif%>
endif
<%endif%>
<%if(idl_files)%>
ADDITIONAL_IDL_TARGETS +=<%foreach(idl_files)%> <%if(flag_overrides(idl_file, gendir))%><%if(!compares(flag_overrides(idl_file, gendir),.))%><%flag_overrides(idl_file, gendir)%>/<%endif%><%basenoextension(idl_file)%>$(IDL_CLIENT_HDR_EXT)<%else%><%noextension(idl_file)%>$(IDL_CLIENT_HDR_EXT)<%endif%><%endfor%>
idl_stubs: $(ADDITIONAL_IDL_TARGETS)
<%if(source_files)%>
# This assignment forces make to run the idl_stubs
# target before building any of the source files.
FORCED_IDL_STUBS = <%source_files%> <%if(pch_source)%>$(ACE_PCH_SOURCE)<%endif%>
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%if(custom_type->input_file->source_output_files)%>
<%foreach(custom_type->input_file->source_output_files)%>
FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>=)
<%endfor%>
<%endif%>
<%endfor%>
<%endfor%>
ifneq ($(FORCED_IDL_STUBS),)
$(FORCED_IDL_STUBS): idl_stubs
endif
<%endif%>
<%endif%>
<%if(exename)%>
ifneq ($(VXWORKSLINK),1)
<%if(libs && libpaths)%>
ifeq ($(static_libs_only), 1)
ifeq ($(use_dep_libs), 1)
DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%><%endfor%> <%lit_libs%>, $(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%> <%libpath%>/<%targetoutdir%><%endif%> <%libpath%><%endfor%>, $(wildcard $(libpath)/$(LIB_PREFIX)$(lib).$(LIBEXT))))
endif
endif
<%endif%>
$(VBIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS)
ifneq (,$(LINK.cc.override))
$(LINK.cc.override)
else
$(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(filter-out %.a,$^) $(VLDLIBS) $(POSTLINK)
endif
endif
<%endif%>
realclean: clean
ifneq ($(GENERATED_DIRTY),)
-$(RM) -r $(GENERATED_DIRTY)
endif
<%if(postclean)%>
-<%eval(postclean)%>
<%endif%>
__prebuild__:
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
<%if(prebuild)%>
@<%eval(prebuild)%>
<%else%>
@-:
<%endif%>
<%foreach(avoids requires)%>
endif
<%endfor%>
<%if(postbuild)%>
all: __postbuild__
__postbuild__:
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
@<%eval(postbuild)%>
<%foreach(avoids requires)%>
endif
<%endfor%>
<%endif%>
.PHONY: install
install: <%if(postbuild)%>__postbuild__<%else%>all<%endif%>
INSTALL_LIB ?= lib
ifneq ($(INSTALL_PREFIX),)
ifneq ($(install_rpath),0)
LDFLAGS += -Wl,-R$(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS)
endif
endif
<%if(install_this_target)%>
PRJINST_OPTIONS ?=
INST_DIR ?= <%if(install_dir)%>/<%install_dir%><%else%>/$(notdir $(PWD))<%endif%>
COMMA = ,
SPACE = $(should_be_unset) $(should_be_unset)
INSTALLER ?= $(MPC_ROOT)/prj_install.pl
CUSTOM_INST_TAGS = $(sort <%custom_install%> <%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%custom_type%> <%endif%><%endfor%><%endfor%>)
<%if(staticname || sharedname)%>
<%if(install_headers)%>
LIB_INST_TAGS = header_files template_files$(if $(findstring 1,$(inline)), inline_files)$(if $(CUSTOM_INST_TAGS), $(CUSTOM_INST_TAGS))
LIB_INST_LOCATIONS = $(foreach tag,$(LIB_INST_TAGS),-b $(tag)=include$(INST_DIR))
<%else%>
ifeq ($(shared_libs),1)
<%endif%>
INST_TAGS = lib_output$(if $(LIB_INST_TAGS), $(LIB_INST_TAGS))
INST_LOCATIONS = $(LIB_INST_LOCATIONS) -o lib_output=$(INSTALL_LIB)
<%if(!install_headers)%>
endif
<%endif%>
<%else%>
<%if(exename)%>
INST_TAGS = exe_output
INST_LOCATIONS = -o exe_output=bin
<%else%>
INST_TAGS = $(CUSTOM_INST_TAGS)<%if(custom_inst_tags)%> <%custom_inst_tags%><%endif%>
INST_LOCATIONS = $(foreach tag,$(INST_TAGS),-b $(tag)=include$(INST_DIR))
<%endif%>
<%endif%>
DATA_INST_TAGS = <%foreach(custom_types)%><%if(compares(custom_type, installdata_files))%><%if(custom_type->input_files)%>installdata_files<%endif%><%endif%><%endfor%>
INST_LOCATIONS += $(if $(DATA_INST_TAGS),-x installdata_files -b installdata_files=share$(INST_DIR))
INST_TAGS := $(INST_TAGS)$(if $(DATA_INST_TAGS), $(DATA_INST_TAGS))
ifeq ($(INSTALLER),/prj_install.pl)
INSTALLER = $(ACE_ROOT)/MPC/prj_install.pl
endif
ifeq ($(LIBCHECK),1)
<%foreach(requires)%>
ifeq ($(<%require%>),1)
<%endfor%>
<%foreach(avoids)%>
ifneq ($(<%avoid%>),1)
<%endfor%>
install:
ifeq ($(INST_TAGS),)
@echo Nothing to install.
else
ifeq ($(INSTALL_PREFIX),)
@echo The variable INSTALL_PREFIX must be set to install.
@echo If binaries are already built and you want to use RPATH,
@echo they must be rebuilt after changing INSTALL_PREFIX.
@false
else
perl -ne'if (/^#END MPC-Generated Install Info/) {exit 0}' \
-e'elsif (/^#BEGIN MPC-Generated Install Info/) {$$ok=1}' \
-e'elsif ($$ok && s/^#//) {print}' $(MAKEFILE) | \
$(INSTALLER) -i -s $(subst $(SPACE),$(COMMA),$(INST_TAGS)) \
$(INST_LOCATIONS) $(if $(ARCH),-d $(ARCH)) $(PRJINST_OPTIONS) \
$(DESTDIR)$(INSTALL_PREFIX)
<%foreach(custom_types)%>
<%if(compares(custom_type, pkgconfig_files))%>
<%if(custom_type->input_files)%>
$(ACE_ROOT)/bin/ace_install_pkgconfig.pl <%custom_type->input_files%> --destdir "$(DESTDIR)" --prefix $(INSTALL_PREFIX) --libdir $(INSTALL_LIB) --libs "$(LIBS)" --version $(GNUACE_PROJECT_VERSION)<%foreach(pkgconfig_variables)%> --custom "<%pkgconfig_variable%>"<%endfor%>
<%endif%>
<%endif%>
<%endfor%>
<%marker(postinstall)%>
endif
endif
<%foreach(requires avoids)%>
endif
<%endfor%>
endif
#BEGIN MPC-Generated Install Info
<%genins%>
#END MPC-Generated Install Info
<%endif%>
<%marker(bottom)%>
|