Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / include / makeinclude / rules.bin.GNU
blob3da9b1b5eaa0e30cd9c4183272f19ee0cd398a89
1 # -*- Makefile -*-
3 #----------------------------------------------------------------------------
6 #       Build binaries
7 #       GNU version
8 #       Requires GNU make
9 #----------------------------------------------------------------------------
11 ifdef BIN
12   VBIN = $(ARCH_BIN:%=%$(VAR))
13   # VBIN always depends on idl_stubs and libraries, if they exist.
14   ifdef IDL_SRC
15     $(VBIN): $(IDL_SRC)
16   endif
17   ifdef VLIBS
18     $(VBIN): $(LIB_INSTALL) $(VLIBS)
19   endif
20 else # !BIN
21   ifndef BIN_UNCHECKED
22     @echo Warning: rules.bin.GNU included, but no BIN targets detected.
23   endif # !BIN_UNCHECKED
24 endif # BIN
26 VOBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(SRC))))
28 ifneq ($(IDL_SRC),)
29   $(VBIN): $(IDL_SRC)
30 endif
32 # Needed for depend.
33 PSRC += $(addsuffix .cpp, $(CLEANUP_BIN))
35 CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT))
37 VXWORKSLINK ?=
39 ifeq ($(VXWORKSLINK),1)
40 $(ARCH_BIN): $(DEFAULTRULE)
41         mv $(DEFAULTRULE) $@
42 else # !VXWORKSLINK
43 # Since we add in the vdir, don't use arch_bin.  use bin instead!
44 $(ARCH_BIN): %: $(VDIR)$(BIN).$(OBJEXT) $(VOBJS)
45         $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(sort $(VDIR)$(BIN).$(OBJEXT) $(VOBJS)) $(VLDLIBS) $(POSTLINK)
46 endif