Debian Codegraph @

include/makeinclude/rules.bin.GNU

raw
1 # -*- Makefile -*-
2
3 #----------------------------------------------------------------------------
4 #
5 #
6 # Build binaries
7 # GNU version
8 # Requires GNU make
9 #----------------------------------------------------------------------------
10
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
25
26 VOBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(SRC))))
27
28 ifneq ($(IDL_SRC),)
29 $(VBIN): $(IDL_SRC)
30 endif
31
32 # Needed for depend.
33 PSRC += $(addsuffix .cpp, $(CLEANUP_BIN))
34
35 CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT))
36
37 VXWORKSLINK ?=
38
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