52 LDLIBS_ptree    = -lproc -lcontract
  53 LDLIBS_pwdx     = -lproc
  54 
  55 LDLIBS += $(LDLIBS_$(PROG))
  56 
  57 CERRWARN_plgrp  += -_gcc=-Wno-parentheses
  58 
  59 CERRWARN_ppriv  += -_gcc=-Wno-parentheses
  60 CERRWARN_ppriv  += -_gcc=-Wno-uninitialized
  61 
  62 CERRWARN_ptree  += -_gcc=-Wno-parentheses
  63 
  64 CERRWARN_pstack += -_gcc=-Wno-uninitialized
  65 CERRWARN_pstack += -_gcc=-Wno-clobbered
  66 
  67 CERRWARN_pargs  += -_gcc=-Wno-clobbered
  68 CERRWARN_pargs  += -_gcc=-Wno-type-limits
  69 
  70 CERRWARN += $(CERRWARN_$(PROG))
  71 
  72 # pargs depends on ../../common/elfcap components
  73 # pmadvise depends on pmap components
  74 
  75 ELFCAP =        $(SRC)/common/elfcap
  76 PMAP =          $(SRC)/cmd/ptools/pmap
  77 
  78 CPPFLAGS_pargs =        -I$(ELFCAP)
  79 OBJS_pargs =            elfcap.o
  80 SRCS_pargs =            $(ELFCAP)/elfcap.c
  81 
  82 CPPFLAGS_pmap =         -I$(PMAP)
  83 OBJS_pmap =             pmap_common.o
  84 SRCS_pmap =             $(PMAP)/pmap_common.c
  85 
  86 CPPFLAGS_pmadvise =     -I$(PMAP)
  87 OBJS_pmadvise =         pmap_common.o
  88 SRCS_pmadvise =         $(PMAP)/pmap_common.c
  89 
  90 CPPFLAGS +=     $(CPPFLAGS_$(PROG))
  91 OBJS +=         $(OBJS_$(PROG))
  92 SRCS +=         $(SRCS_$(PROG))
  93 
  94 INSTALL_NEW=
  95 INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
  96         $(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
  97 
  98 .KEEP_STATE:
  99 
 100 elfcap.o:       $(ELFCAP)/elfcap.c
 101                 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
 102 
 103 pmap_common.o:  $(PMAP)/pmap_common.c
 104                 $(COMPILE.c) -o $@ $(PMAP)/pmap_common.c
 105 
 106 %.o:    ../%.c
 107         $(COMPILE.c) $<
 108 
 109 all:    $(PROG)
 110 
 111 ROOTBINPROG=$(ROOTBIN)/$(PROG)
 112 ROOTPROCBINSYMLINK=$(ROOT)/usr/proc/bin/$(PROG)
 113 
 114 $(PROG): $$(OBJS)
 115         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
 116         $(POST_PROCESS)
 117 
 118 #
 119 # Install the ptool, symlinking it into /usr/proc/bin if PTOOL_TYPE is set
 120 # to LEGACY.
 121 #
 122 install: all $(ROOTISAPROG)
 123         -$(RM) $(ROOTBINPROG)
 124         -$(LN) $(ISAEXEC) $(ROOTBINPROG)
 125         -$(INSTALL_$(PTOOL_TYPE))
 126 
 127 clean:
 128         $(RM) $(OBJS)
  | 
 
 
  52 LDLIBS_ptree    = -lproc -lcontract
  53 LDLIBS_pwdx     = -lproc
  54 
  55 LDLIBS += $(LDLIBS_$(PROG))
  56 
  57 CERRWARN_plgrp  += -_gcc=-Wno-parentheses
  58 
  59 CERRWARN_ppriv  += -_gcc=-Wno-parentheses
  60 CERRWARN_ppriv  += -_gcc=-Wno-uninitialized
  61 
  62 CERRWARN_ptree  += -_gcc=-Wno-parentheses
  63 
  64 CERRWARN_pstack += -_gcc=-Wno-uninitialized
  65 CERRWARN_pstack += -_gcc=-Wno-clobbered
  66 
  67 CERRWARN_pargs  += -_gcc=-Wno-clobbered
  68 CERRWARN_pargs  += -_gcc=-Wno-type-limits
  69 
  70 CERRWARN += $(CERRWARN_$(PROG))
  71 
  72 #
  73 # Common code definitions
  74 #
  75 COBJS = ptools_common.o
  76 CINC = -I../../common
  77 
  78 # pargs depends on ../../common/elfcap components
  79 # pmadvise depends on pmap components
  80 
  81 ELFCAP =        $(SRC)/common/elfcap
  82 PMAP =          $(SRC)/cmd/ptools/pmap
  83 
  84 CPPFLAGS_pargs =        -I$(ELFCAP)
  85 OBJS_pargs =            elfcap.o
  86 SRCS_pargs =            $(ELFCAP)/elfcap.c
  87 
  88 CPPFLAGS_pmap =         -I$(PMAP) $(CINC)
  89 OBJS_pmap =             pmap_common.o $(COBJS)
  90 SRCS_pmap =             $(PMAP)/pmap_common.c
  91 
  92 CPPFLAGS_pmadvise =     -I$(PMAP) $(CINC)
  93 OBJS_pmadvise =         pmap_common.o $(COBJS)
  94 SRCS_pmadvise =         $(PMAP)/pmap_common.c
  95 
  96 CPPFLAGS_preap =        $(CINC)
  97 OBJS_preap =            $(COBJS)
  98 
  99 CPPFLAGS_psig =         $(CINC)
 100 OBJS_psig =             $(COBJS)
 101 
 102 CPPFLAGS_ptime =        $(CINC)
 103 OBJS_ptime =            $(COBJS)
 104 
 105 CPPFLAGS_ptree =        $(CINC)
 106 OBJS_ptree =            $(COBJS)
 107 
 108 CPPFLAGS_pwait =        $(CINC)
 109 OBJS_pwait =            $(COBJS)
 110 
 111 CPPFLAGS_pwdx =         $(CINC)
 112 OBJS_pwdx =             $(COBJS)
 113 
 114 CPPFLAGS +=     $(CPPFLAGS_$(PROG))
 115 OBJS +=         $(OBJS_$(PROG))
 116 SRCS +=         $(SRCS_$(PROG))
 117 
 118 # For lint, always include ptools_common.c, but suppress the "defined but
 119 # not used" error, in case a given ptool doesn't need it.
 120 SRCS +=         ../../common/ptools_common.c
 121 LINTFLAGS +=    -xerroff=E_NAME_DEF_NOT_USED2
 122 LINTFLAGS64 +=  -xerroff=E_NAME_DEF_NOT_USED2
 123 
 124 INSTALL_NEW=
 125 INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
 126         $(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
 127 
 128 .KEEP_STATE:
 129 
 130 elfcap.o:       $(ELFCAP)/elfcap.c
 131                 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
 132 
 133 pmap_common.o:  $(PMAP)/pmap_common.c
 134                 $(COMPILE.c) -o $@ $(PMAP)/pmap_common.c
 135 
 136 %.o:    ../%.c
 137         $(COMPILE.c) $<
 138 
 139 %.o:    ../../common/%.c
 140         $(COMPILE.c) $<
 141         $(POST_PROCESS_O)
 142 
 143 all:    $(PROG)
 144 
 145 ROOTBINPROG=$(ROOTBIN)/$(PROG)
 146 ROOTPROCBINSYMLINK=$(ROOT)/usr/proc/bin/$(PROG)
 147 
 148 $(PROG): $$(OBJS)
 149         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
 150         $(POST_PROCESS)
 151 
 152 #
 153 # Install the ptool, symlinking it into /usr/proc/bin if PTOOL_TYPE is set
 154 # to LEGACY.
 155 #
 156 install: all $(ROOTISAPROG)
 157         -$(RM) $(ROOTBINPROG)
 158         -$(LN) $(ISAEXEC) $(ROOTBINPROG)
 159         -$(INSTALL_$(PTOOL_TYPE))
 160 
 161 clean:
 162         $(RM) $(OBJS)
  |