📄 makefile
字号:
# Makefile - for hutils executable## modification history# --------------------# 02s,30mar99,fle doc : added doc for windman# 02r,18feb99,sn removed documentation for (obsolete) orderCtors# 02q,26jan99,jco merged from html1_0 branch# 02p,15jan99,fle added syngen to documented items# 02o,16nov98,sn added munch, orderCtors to doc files# 02m,12oct98,fle added refgen to doc files since it is part of the host# utilities# 02l,23sep98,fle doc : changed doc files book variable# 02k,22sep98,fle doc : changed refgen options since refgen.tcl# 02j,18sep98,c_s adjust compile on HP# 02i,25aug98,yh added getHostAddrHp for HPPROGS.# 02h,03aug98,fle doc : redirected doc output to DOCS_DIR# 02g,23jul98,p_m removed windman.sh.# 02f,23jun98,fle removed installUlip.sh from Doc files since its removal# from directory# 02e,10jun98,p_m Removed WIND_BIN/cccp.o from LOCAL_CLEAN rule# Removed unsupported hosts references and Ulip for# gosts other than Solaris.# 02d,10jun98,p_m Removed cpp that was only required by the old mpp stuff# 02c,09jun98,p_m removed makeVersion and bspTo5.3. Removed prehistory.# Fixed SPR 21057 removed extract.sh# 02b,28may98,fle doc now uses refgen instead of mangeen# 02a,29oct97,kkk changed xsymArm.c to xsymcArm.c in doc list.# 01z,29jan97,elp added xsymcArm.c, coffArmToBin.c (in both docs and bin). # 02l,18mar98,dbt now build HPPROGS on parisc-hpux10. Removed ulip related# binaries from HPPROGS (no longer used).# 02k,18mar98,jmb HPSIM merge of jmb patch from 23sep97: added xlinkHppa# to man pages (SPR 9319).# 01j,18mar98,jmb HPSIM merge of Mark Mason patch from 18apr97:# add xlinkHppa utility.# 02i,02mar98,jco added munch support# 02h,30jan98,dbt added HPUX10 support.# 02g,18sep97,elp removed -Xs option to compile getHostAddr.c with ansi netdb.h# 02f,01apr97,cth added build of configUlipSolaris# 01a,22may95,jcf written, based on target/src/hutils/MakeSkel v01u.# + p_m## DESCRIPTION# This file contains the makefile rules for building the wtxtcl executables,# shell scripts, and error database.## SUBSTITUTION## INCLUDES# $(WIND_BASE)/host/include/make/generic.mh# $(WIND_BASE)/host/include/make/$(HOST).mh# $(WIND_BASE)/host/include/make/generic2.mh#include $(WIND_BASE)/host/include/make/generic.mhinclude $(WIND_BASE)/host/include/make/$(HOST).mhINCLUDES = $(WIND_INC) $(WIND_SHARE_INC) EXTERN_INC = -I$(WIND_BASE)/host/src/hutils/$(HOST) LOCAL_CFLAGS = SH_DOC_FILES = binToAsm.sh extractBsp.sh installOption.sh \ makeStatTbl.sh makeSymTbl.sh munch.sh romsize.sh \ vxsize.sh installUlipSolaris.sh configUlipSolaris.sh \ wind_host_type.shC_DOC_FILES = aoutToBin.c aoutToBinDec.c coffHex.c coffHex960.c \ coffHexArm.c coffArmToBin.c coffToBin.c deflate.c elfHex.c \ elfToBsd.c elfToBin.c elfXsyms.c hex.c hexDec.c vxencrypt.c \ xsym.c xsymcArm.c xsymc.c xsymDec.c xsymHppa.c xlinkHppa.cTCL_DOC_FILES = ../../resource/doctools/refgen.tcl \ ../../resource/doctools/helpDlg.tcl \ ../../resource/doctools/htmlLink.tcl \ ../../resource/doctools/htmlBook.tcl \ ../../resource/doctools/syngen.tcl## files and directoriesSYSVPROGS =HPPROGS = $(WIND_BIN)/xsymHppa $(WIND_BIN)/xlinkHppa \ $(WIND_BIN)/getHostAddrHpMIPSPROGS = $(WIND_BIN)/ecoffHex $(WIND_BIN)/ecoffXsymsSOLARISPROGS = $(WIND_BIN)/loopd $(WIND_BIN)/ulipSolaris \ $(WIND_BIN)/installUlipSolaris $(WIND_BIN)/ulipSolaris.conf \ $(WIND_BIN)/configUlipSolaris $(WIND_BIN)/getHostAddrBINPROGS1 = $(WIND_BIN)/aoutToBin $(WIND_BIN)/coffToBin \ $(WIND_BIN)/coffArmToBin $(WIND_BIN)/ecoffToBin \ $(WIND_BIN)/vxencrypt $(WIND_BIN)/hexDec \ $(WIND_BIN)/aoutToBinDec \ $(WIND_BIN)/hex \ $(WIND_BIN)/deflate# programs associated with ELF object files. elfutils.c has all the common# code for reading the various headers and byte swapping. ELFPROGS = $(WIND_BIN)/elfHex $(WIND_BIN)/elfXsyms \ $(WIND_BIN)/elfToBin $(WIND_BIN)/elfToBsd \ $(WIND_BIN)/cvtupperElfBINPROGS2 = $(WIND_BIN)/coffHex $(WIND_BIN)/coffHex960 \ $(WIND_BIN)/coffHexArmBIN2_MIPS = $(BINPROGS2) $(MIPSPROGS)BINPROGS = $(BINPROGS1) $(BINPROGS2) \ $(WIND_BIN)/xsym \ $(WIND_BIN)/xsymcArm $(WIND_BIN)/xsymc $(WIND_BIN)/xsymDec \ $(WIND_BIN)/mkprep $(WIND_BIN)/cvtupperREAL_SHELL = $(WIND_BIN)/aspp $(WIND_BIN)/binToAsm \ $(WIND_BIN)/extractBsp $(WIND_BIN)/installOption \ $(WIND_BIN)/makeStatTbl $(WIND_BIN)/makeSymTbl \ $(WIND_BIN)/ppscale $(WIND_BIN)/pretroff \ $(WIND_BIN)/romsize \ $(WIND_BIN)/vwbug \ $(WIND_BIN)/vwsupport \ $(WIND_BIN)/installUpdateLib \ $(WIND_BIN)/shwait $(WIND_BIN)/vxsize $(WIND_BIN)/munchSHELLPROGS = $(REAL_SHELL) $(WIND_BIN)/sysibr.ld \ $(WIND_BASE)/host/resource/wind_host_typeTCLPROGS = $(WIND_BIN)/bspBuild.tcl $(WIND_BIN)/depend.tcl \ $(WIND_BIN)/munch.tcl $(WIND_BIN)/find.tclLOCAL_CLEAN = $(BINPROGS) $(SHELLPROGS) $(MIPSPROGS) \ $(SOLARISPROGS) $(HPPROGS) $(ELFPROGS) $(TCLPROGS)PROGRAMS = $(HOST) DOCS = docEXTERN_HEAD = ecoff.h ecoffSyms.h a_out.h som_coff.h \ loadCoffLib.h elf.h elftypes.h######################################################################default : headers_in prog headers_out sun4-solaris2 : $(BINPROGS) $(ELFPROGS) $(SHELLPROGS) $(SOLARISPROGS) \ $(TCLPROGS)parisc-hpux10 : $(BINPROGS) $(HPPROGS) $(ELFPROGS) $(SHELLPROGS) \ $(TCLPROGS)######################################################################headers_in: @ if [ ! -d ./$(HOST) ]; then \ mkdir ./$(HOST); \ fi (cd $(HOST); $(RM) $(EXTERN_HEAD)); \ ln -s $(patsubst %.h,$(WIND_BASE)/target/h/%.h,$(EXTERN_HEAD)) \ $(HOST)headers_out: @ /bin/rm -rf ./$(HOST)################### bin programs ######################################## Support code for elf utils$(WIND_BIN)/elfutil.o : elfutil.c elfutil.h @ $(RM) $@ (cd $(HOST); \ $(CC) $(CFLAGS) $(EXTERN_INC) -c -o $@ ../elfutil.c)$(ELFPROGS) : $(patsubst $(WIND_BIN)/%,%.c,$(ELFPROGS)) $(WIND_BIN)/elfutil.o @ $(RM) $@; (cd $(HOST); \ $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ \ $(patsubst $(WIND_BIN)/%,../%.c,$@) $(WIND_BIN)/elfutil.o)$(BINPROGS1) : $(patsubst $(WIND_BIN)/%,%.c,$(BINPROGS1)) @ $(RM) $@; (cd $(HOST); \ $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ \ $(patsubst $(WIND_BIN)/%,../%.c,$@))$(BIN2_MIPS) : $(patsubst $(WIND_BIN)/%,%.c,$(BIN2_MIPS)) @ $(RM) $@; (cd $(HOST); \ $(CC) $(CFLAGS) $(CFLAGS_EXTRA) $(EXTERN_INC) -o $@ \ $(patsubst $(WIND_BIN)/%,../%.c,$@))$(WIND_BIN)/xsym960 : xsym.c $(HOST)/b_out.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -DB_OUT -o $@ ../xsym.c)$(WIND_BIN)/xsym : xsym.c $(HOST)/a_out.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ ../xsym.c)$(WIND_BIN)/xlinkHppa : xlinkHppa.c $(HOST)/som_coff.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ ../xlinkHppa.c)$(WIND_BIN)/xsymHppa : xsymHppa.c $(HOST)/som_coff.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ ../xsymHppa.c)$(WIND_BIN)/xsymc : xsymc.c $(HOST)/a_out.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ ../xsymc.c)$(WIND_BIN)/xsymcArm : xsymcArm.c @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ ../xsymcArm.c)$(WIND_BIN)/xsymDec : xsymDec.c $(HOST)/a_out.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) $(EXTERN_INC) -o $@ ../xsymDec.c)$(WIND_BIN)/mkprep : mkprep.c prepHeader.h cetElf.h cetXcoff.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) -o $@ ../mkprep.c)$(WIND_BIN)/cvtupper : cvtupper.c @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) -o $@ ../cvtupper.c)# XXX do not use -Xs since it does not compile with ansi version of netdb.h$(WIND_BIN)/getHostAddr : getHostAddr.c @ $(RM) $@; (cd $(HOST); $(CC) -O -DSUN4_SOLARIS2 -lnsl -o $@ ../getHostAddr.c)$(WIND_BIN)/getHostAddrHp: getHostAddrHp.c @ $(RM) $@; (cd $(HOST); $(CC) -O -D_HPUX_SOURCE -DPARISC_HPUX10 -o $@ ../getHostAddrHp.c)$(WIND_BIN)/deflate : adler32.c deflate.c vxDeflate.c zutil.c trees.c \ deflate.h zconf.h zlib.h zutil.h @ $(RM) $@; (cd $(HOST); $(CC) $(CFLAGS) -o $@ ../adler32.c ../deflate.c \ ../vxDeflate.c ../zutil.c ../trees.c)################### shell programs #####################################$(TCLPROGS): $(notdir $(TCLPROG)) @$(RM) $@ $(CP) $(notdir $@) $@$(REAL_SHELL): $(patsubst $(WIND_BIN)/%, %.sh,$(REAL_SHELL)) @$(RM) $@ $(CP) $(patsubst $(WIND_BIN)/%, %.sh,$@) $@ @chmod u=rwx,g=rx,o= $@$(WIND_BIN)/sysibr.ld: sysibr.ld @ $(RM) $@ $(CP) $? $@ @chmod u=rwx,g=rx,o= $@$(WIND_BASE)/host/resource/wind_host_type: wind_host_type.sh @ $(RM) $@ $(CP) $? $@ @chmod u=rwx,g=rx,o= $@################### ulip network driver #####################################XDEFsun4-solaris2 = -D_KERNEL -DsparcXDEF = $(XDEF${HOST})# required to use acc and ld rather than gnu tools for solaris ulip$(WIND_BIN)/ulipSolaris : ulipSolaris.c @ $(RM) $@ acc $(XDEF) -I$(WIND_BASE)/host/include -c -o /tmp/ulipSolaris.o \ ulipSolaris.c ld -r -o $@ /tmp/ulipSolaris.o @ $(RM) /tmp/ulipSolaris.o$(WIND_BIN)/ulipSolaris.conf : ulipSolaris.conf @ $(RM) $@ $(CP) $? $@$(WIND_BIN)/installUlip : installUlip.sh @ $(RM) $@ $(CP) $? $@ @ chmod u=rwx,g=rx,o= $@$(WIND_BIN)/installUlipSolaris : installUlipSolaris.sh @ $(RM) $@ $(CP) $? $@ @ chmod u=rwx,g=rx,o= $@$(WIND_BIN)/configUlipSolaris : configUlipSolaris.sh @ $(RM) $@ $(CP) $? $@ @ chmod u=rwx,g=rx,o= $@$(WIND_BIN)/loopd : loopd.c @ $(RM) $@ acc $(XDEF) -I$(WIND_BASE)/host/include -DSUN4_SOLARIS -o $@ loopd.c# end MakeSkelpostinstall: $(WIND_BASE)/target/.postinstall \ $(WIND_BASE)/target/update/$(VX_INSTOPTION) \ $(WIND_BASE)/target/update/$(VX_INSTOPTION)/install# If VX_INSTOPTION is set in the build environment, it will be used to# set the value of VX_INSTOPTION in .postinstall, which determines# which product update installation script is executed by "installOption".$(WIND_BASE)/target/.postinstall: postinstall.sh @ $(RM) $@ sed "/VX_INSTOPTION=$$/s/$$/$(VX_INSTOPTION)/" $? > $@ @chmod u=rw,g=r,o= $@$(WIND_BASE)/target/update/$(VX_INSTOPTION): mkdir $@$(WIND_BASE)/target/update/$(VX_INSTOPTION)/install: inst$(VX_INSTOPTION).sh @ $(RM) $@ $(CP) $? $@ @chmod u=rwx,g=rx,o= $@doc: sh_doc c_doc tcl_doc $(WIND_BIN)/htmlLink $(DOCS_ROOT)/tornado/hutilsc_doc: $(C_DOC_FILES) $(WIND_BIN)/refgen $(REFGEN_OPT) \ -book Tornado_Reference \ -chapter Tornado_Utilities \ -out $(DOCS_ROOT)/tornado/hutils $(C_DOC_FILES)sh_doc: $(SH_DOC_FILES) $(WIND_BIN)/refgen $(REFGEN_OPT) \ -book Tornado_Reference \ -chapter Tornado_Utilities \ -out $(DOCS_ROOT)/tornado/hutils $(SH_DOC_FILES)tcl_doc: $(TCL_DOC_FILES) $(WIND_BIN)/refgen $(REFGEN_OPT) \ -book Tornado_Reference \ -chapter Tornado_Utilities \ -out $(DOCS_ROOT)/tornado/hutils $(TCL_DOC_FILES)include $(WIND_BASE)/host/include/make/generic2.mh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -