linux/scripts/Makefile.host
<<
>>
Prefs
   1# ==========================================================================
   2# Building binaries on the host system
   3# Binaries are used during the compilation of the kernel, for example
   4# to preprocess a data file.
   5#
   6# Both C and C++ are supported, but preferred language is C for such utilities.
   7#
   8# Sample syntax (see Documentation/kbuild/makefiles.txt for reference)
   9# hostprogs-y := bin2hex
  10# Will compile bin2hex.c and create an executable named bin2hex
  11#
  12# hostprogs-y    := lxdialog
  13# lxdialog-objs := checklist.o lxdialog.o
  14# Will compile lxdialog.c and checklist.c, and then link the executable
  15# lxdialog, based on checklist.o and lxdialog.o
  16#
  17# hostprogs-y      := qconf
  18# qconf-cxxobjs   := qconf.o
  19# qconf-objs      := menu.o
  20# Will compile qconf as a C++ program, and menu as a C program.
  21# They are linked as C++ code to the executable qconf
  22
  23# hostprogs-y := conf
  24# conf-objs  := conf.o libkconfig.so
  25# libkconfig-objs := expr.o type.o
  26# Will create a shared library named libkconfig.so that consists of
  27# expr.o and type.o (they are both compiled as C code and the object files
  28# are made as position independent code).
  29# conf.c is compiled as a C program, and conf.o is linked together with
  30# libkconfig.so as the executable conf.
  31# Note: Shared libraries consisting of C++ files are not supported
  32
  33__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
  34
  35# C code
  36# Executables compiled from a single .c file
  37host-csingle    := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
  38
  39# C executables linked based on several .o files
  40host-cmulti     := $(foreach m,$(__hostprogs),\
  31# No41">  41 432
 423#Oobject(.o)+ files compiled from .c files
 440host--objs      := $(sort $(hostprogs-y) $(hostprogs-m))
  45# C code
  46# Executables comp4led f4om a sinf
  47host-csingle    :=4$(for47m a sinf
  48
  49# C executables li4ked b49$(hostprogxxostprogs$(if $($(m)-objs),,$(m)))
  50host-cmulti     :=5$(for50.host#433" id="433" class="line" name5No41">  51 452
 453#Oobject(.o)+ file5 comp53.host#433" id="433" class="line" name5"L34"> 450host--objs      :=5$(sor5bkconfi C++ filesare no(onlyefilefile.hosst#L38" id="L38" class="line" name5L5">   5<#
  56# Executables comp5led f56ch m,$(__hohles$(hostprogs-m))
  57host-csingle    :=5$(for57m a siRemove  hrea href/Make"xxxle.ho"t#L38" id="L38" class="line" name5"L38">  58
  59# C executables li5ked b59.host#433" id="433" class="line" name6"L40">  60host-cmulti     :=6$(for6ecutabm .c files
  61 462
 463#Oobject(.o)+ file6 comp6led frooutookudirc foryts/Matogethes/file.host#L40" id="L40" class="line" name6"L34"> 460host--objs      :=6$(sor64ref="scripts/Makefiletools/nce)
 may have beerippecified.iRetre ve dirc foryt#L40" id="L40" class="line" name6L5">   56#
   6<# Both C and C++ areled f6om a sidirc foryt
  67host-csingle    :=6$(for67ch m,$(__e.hdirss+(if $($(m)-ofjs),$(__hostpr h$$$$$$$$$$$$$$$$$$st#L41" id="L4name="L31">  31#6"L38">  68
  31#6"L39">  69# C executables li6ked b69$(m)-cxxobjs),,$(if $($) $($(m)-objdirif m)akefdirif e.hosot#L38" id="L38" class="line" name7"L40">  70host-cmulti     :=7$(for70m a sidirc foryt
  71  31#7"432"> 472
  31#7"433"> 473#Oobject(.o)+ file7 comp73$(m)-cxxobjs),,$(if $($) $($(m)-objdirif m)akefdirif e.hosot#L38" id="L38" class="line" name7"L34"> 470host--objs      :=7$(sor7e.host#L35" id="L35" class="line" name7L5">   57#
   67# Both C and C++ ar7led f76.host#L35" id="L35" class="line" name7L7">   7<#
  78
  79# C executables li7ked b79$(hostprogostprogs),$(if addch uixif e.h)/js)stprogostpro ot#L38" id="L38" class="line" name8"L40">  80host-cmulti     :=8$(for8ach m,$(__hostprogs),\
  81 482
 483#Oobject(.o)+ file8 comp83$(hostprogxxs-y) $(htprogaddch uixif e.h)/js)stprogxx))
 480host--objs      :=8$(sor84ch m,$(__hohles$(hostprogaddch uixif e.h)/js)stprogohlesaot#L38" id="L38" class="line" name8L5">   58#
   68# Both C and C++ ar8led f86ch m,$(__e.hdirss$(htprogaddch uixif e.h)/js)stproe.hdirshot#L38" id="L38" class="line" name8L7">   78#
   8<# Sample syntax (seeakefi88stpre.h-dirss+(if stproe.hdirsht#L35" id="L35" class="line" name8"L39">  89# C executables li8ked b89.host#433" id="433" class="line" name9"L40">  90host-cmulti     :=9$(for90m a ssssst#433" id="433" class="line" name9No41">  91
	sef="gcc. Sfile.h bystem
 492
 493#Oobject(.o)+ file9 comp9ostpro" nac_flahosss(if HOSTCFLAGS)$($(mHOST_EXTRACFLAGS)$($st#L41" id="L4name="L31">  31#9"L34"> 490host--objs      :=9$(sor94$(m)-cxxobjs),,$(if $f HOSTCFLAGS_$(ref=type=").ost#L9" id="L9" class="line" name="LL5">   59#
  31#9L6">   69# Both C and C++ ar9led f96$(m)-cxxobjs),,$(if $f HOSTCXXFLAGS_$(ref=type=").ost#L9" id="L9" class="line" name="LL7">   79#
   89# Sample syntax (se9akefi98stprifeq ff KBUILD_SRC),st#L9" id="L9" class="line" name="LL9">   9<# hostprogs-y := binked b99stprogs-y)c_flahosss(if gs-y)c_flahost#L9" id="L9" class="line" name="10"L10">  100# Will compile bin2h$(fo2h$stprogs-y)cxx_flahos(if gs-y)cxx_flahost#L9" id="L9" class="line" name="10"L11">  101#
  102# hostprogs-y    :=02(fo2h2stprogs-y)c_flahosss(i-If e.h)if caed flaho,gs-y)c_flahost#L9" id="L9" class="line" name="10"L13">  103# lxdialog-objs := 03(fo2h3stprogs-y)cxx_flahos(i-If e.h)if caed flaho,gs-y)cxx_flahost#L9" id="L9" class="line" name="10"L14">  104# Will compile lxdi04(fo2h4$(m)endist#L18" id="L18" class="line" name=0"L15">  105# lxdialog, based o05(fo2h5.host#433" id="433" class="line" name10"L16">  106#
  107# hostprogs-y      07(fo2h7ch m,$(_cxx_flahoss(i-Wp,-MDkefdep"lin)if _gs-y)cxx_flahost#L9" id="L9" class="line" name="10"L18">  108# qconf-cxxobjs   :08(fo2he.host#L39" id="L39" class="line" name10"L19">  109# qconf-objs      :09(fo2h9m a ssssst#433" id="433" class="line" name1="L10">  110# Will compile bin22hex.1 and creC and metogethescripts/Makeft#433" id="433" class="line" name1="L11">  111#
  112# hostprogs-y    :== lxd1alog
  113# lxdialog-objs :=  chec11href="scripogostprog-ass=ingle .c fit#L37" id="L37" class="line" name1="L14">  114# Will compile lxdiialog1c and quiet_cmd_stprogostprogs= HOSTCC $f@t#L37" id="L37" class="line" name1="L15">  115# lxdialog, based oon ch1cklist$(if $cmd_stprogostprogs= f HOSTCCipts/Makc_flahos -o$f@ $&ls=ist#L41" id="L4name="L31">  31#1="L16">  116#
  117# hostprogs-y       := q1onf
  118# qconf-cxxobjs   ::= qc118$(m)-cxxobjsf caed if_changed_dep,stprogostpro t#L38" id="L38" class="line" name1="L19">  119# qconf-objs      ::= me119.host#433" id="433" class="line" name1="L20">  120# Will compile qco1nf as1a C++ prLript href="scriptsref="scri"scrt
  121# They are linked 1as C+1 code to,$(__hostpro-ass=ikefile.host#L15" id="L15" class="line" name=2"L12">  122# hostprogs-y    :=  lxd1le.hosquiet_cmd_stprogostprogs= HOSTLD $f@t#L37" id="L37" class="line" name1="L23">  123# hostprogs-y := c1onf
<123list$(if $cmd_stprogostprogs= f HOSTCCiptsHOSTLDFLAGS)$-o$f@ st#L41" id="L4name="L31">  31#1="L24">  124# conf-objs  := co1nf.o 124$(m)-cxxobjs),,$(if $s),,$(if (maddch uixif e.h)/js)$(@Fhle.hoso st#L41" id="L4name="L31">  31#1="L15">  125# libkconfig-objs 1:= ex125$(m)-cxxobjs),,$(if $s),,$(if (mHOST_LOADLIBES)$(mHOSTLOADLIBES_$(@Fhot#L38" id="L38" class="line" name1="L26">  126# Will create a sh1ared 1ibrarys)stprogostpra:if e.h)/%:if stprog))
  127# expr.o and type.1o (th1y are -cxxobjsf caed if_changed,stprogostprat#L38" id="L38" class="line" name1="L18">  128# are made as posi1tion 12e.host#L39" id="L39" class="line" name1="L29">  129# conf.c is compil1ed as1a C progCibkcon.rea hrl"scripts/Makefile.host#L37" id="L37" class="line" name1="L30">  130# libkconfig.so as1 the 1xecutablstprogs-y) -ass=iost#L19" id="L19" class="line" name=="L31">  131# Note: Shared lib1rarie1 consiquiet_cmd_stprogs-y) $(h= HOSTCC $f@t#L37" id="L37" class="line" name1="L32">  132
  133# lxdialog-objs := cnf
<1hostprf stprog))
  134
  135# C code
  136# Executables comp1iled 1rom a siLript href="scriptsref="scri"scrt
  137host-csingle    :=1 $(fo137cutablstprogxxostpro-ass=ikefile.host#L15" id="L15" class="line" name=="L38">  138
  139# C executables li1nked 139list$(if $cmd_stprogxxostpro= f HOSTCXXiptsHOSTLDFLAGS)$-o$f@ st#L41" id="L4name="L31">  31#1="L40">  140host-cmulti     :=1 $(fo1each m-cxxobjs),,$(if $s),,$(if (mm)))
  31#1 No41">  141  31#1="L32">  132
 4123#Oobject(.o)+ file1s com14ostprf stprogxxostpra:if e.h)/%:if stprog))
  144# Will compile lxdiaakef144$(m)-cxxobjsf caed if_changed,stprogxxostprat#L38" id="L38" class="line" name14"L15">  145# C code
  146# Executables comp14led 14om a sinibkcon.rea hrl"scripts/Makefilc (C++)e.host#L37" id="L37" class="line" name1="L37">  147host-csingle    :=14$(fo147m a quiet_cmd_stprogxxs-y) $= HOSTCXX$f@t#L37" id="L37" class="line" name14"L38">  148
  149# C executables li14ked 149$(hos)stprogxx))
  150host-cmulti     :=15$(fo150$(m)-cxxobjsf caed if_changed_dep,stprogxx))
  151 4152
 4153#Oobject(.o)+ file15 com15href="scripogohs-y) -ass=iost#L19" id="L19" class="line" name=5"L34"> 4150host--objs      :=15$(so15 and quiet_cmd_stprogohs-y) $= HOSTCC $-fPIC$f@t#L37" id="L37" class="line" name15L5">   51<#
  156# Executables comp15led 15brarys)stprogoh))
  157host-csingle    :=15$(fo15 are -cxxobjsf caed if_changed_dep,stprogoh))
  158
  159# C executables li15ked 159m a siLript ig.so that consialog.o
  160host-cmulti     :=16$(fo16ecutab *.re-ass=iosoig.so that consi)stprogohlesat#L40" id="L40" class="line" name16No41">  161 4162
  31#16"433"> 4163#Oobject(.o)+ file16 com163$(m)-cxxobjs),,$(if $($) $($f (maddch uixif e.h)/js)$(@F: hr=le.hosos st#L41" id="L4name="L31">  31#16"L34"> 4160host--objs      :=16$(so164$(m)-cxxobjs),,$(if $s),,$(if (mHOST_LOADLIBES)$(mHOSTLOADLIBES_$(@Fhot#L38" id="L38" class="line" name16L5">   516#
  166#
  167host-csingle    :=16$(fo167.host#L35" id="L35" class="line" name16"L38">  168
  31#16"L39">  169# C executables li16ked 169$(m)-cxxobjs),,f stprogxxostpra s)stprogxx))
  31#17"L40">  170host-cmulti     :=17$(fo170.host#433" id="433" class="line" name17No41">  171
Tts/Mriginal LXR softwd they"scri#433" id=http://sourcem))ge.net/cho.c fs/lxr">LXR communitych m, den"oth eri for l vers="scey"#433" id=mailto:lxr@lost".no">lxr@lost".noch m.
iv id="ile_ca000000subfooter">
lxr.lost".no kriplyscriphe by"#433" id=http://www.o tnd l-loscho.no">R tnd liLricho ASch m, chovidert

	seservicests/Mce 1995.
iv id="fi/body="i/html"s