Print this page
    
4174 Torch the old and unmaintained Sun-dhcp
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Dan McDonald <danmcd@omniti.com>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/cmd/cmd-inet/usr.sbin/Makefile
          +++ new/usr/src/cmd/cmd-inet/usr.sbin/Makefile
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  12   12  #
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  
    | 
      ↓ open down ↓ | 
    17 lines elided | 
    
      ↑ open up ↑ | 
  
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24  # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  25   25  #
  26   26  
  27   27  SYNCPROG=       syncinit syncloop syncstat
  28      -DHCPPROG=       dhcpconfig dhtadm pntadm
  29   28  
  30   29  PROG=           6to4relay arp if_mpadm \
  31   30                  in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
  32   31                  in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \
  33      -                ndd $(SYNCPROG) $(DHCPPROG) wanbootutil
       32 +                ndd $(SYNCPROG) wanbootutil
  34   33  
  35   34  MANIFEST=       rarp.xml telnet.xml comsat.xml finger.xml \
  36   35                  login.xml shell.xml rexec.xml socket-filter-kssl.xml
  37   36  SVCMETHOD=      svc-sockfilter
  38   37  
  39   38  ROOTFS_PROG=    hostconfig route soconfig
  40   39  SBINLINKS=      hostconfig route
  41   40  
  42   41  RPCSVCPROG=     hostconfig
  43   42  AUDITPROG=      in.rexecd in.rlogind in.rshd in.telnetd
  44   43  PAMPROG=        in.rexecd in.rlogind in.rshd in.telnetd
  45   44  SOCKETPROG=     6to4relay arp hostconfig if_mpadm in.comsat \
  46   45                  in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
  47   46                  in.rwhod in.telnetd in.tftpd ipaddrsel route
  48   47  NSLPROG=        6to4relay arp hostconfig in.comsat in.rarpd \
  49   48                  in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
  50   49                  in.tftpd ipaddrsel route
  51   50  CMDPROG=        in.telnetd
  52   51  K5PROGS=        in.telnetd in.rlogind in.rshd
  53   52  TSNETPROG=      route
  54   53  DLADMPROG=      6to4relay
  55   54  DEFAULTFILES=   telnetd.dfl
  56   55  
  57   56  PROGSRCS=       $(PROG:%=%.c)
  58   57  TFTPDOBJS=      in.tftpd.o tftpsubs.o
  59   58  OTHERSRC=       ../usr.bin/tftp/tftpsubs.c
  60   59  K5RLOGINOBJS=   in.rlogind.o
  61   60  K5RSHDOBJS=     in.rshd.o
  62   61  K5TELNETOBJS=   in.telnetd.o
  63   62  SRCS=           $(PROGSRCS) $(OTHERSRC)
  64   63  
  65   64  SUBDIRS=        bootconfchk ifconfig ilbadm in.rdisc in.routed \
  66   65                  in.talkd inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
  67   66                  kssl/kssladm kssl/ksslcfg nwamadm nwamcfg ping routeadm \
  68   67                  snoop sppptun traceroute wificonfig
  69   68  
  70   69  MSGSUBDIRS=     bootconfchk ifconfig ilbadm in.routed in.talkd \
  71   70                  inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
  72   71                  kssl/ksslcfg nwamadm nwamcfg routeadm sppptun snoop wificonfig
  73   72  
  74   73  # As programs get lint-clean, add them here and to the 'lint' target.
  75   74  # Eventually this hack should go away, and all in PROG should be
  76   75  # lint-clean.
  77   76  LINTCLEAN=      6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
  78   77                  ipaddrsel route \
  79   78                  in.rarpd if_mpadm $(SYNCPROG)
  80   79  # Likewise, as subdirs get lint-clean, add them here.  Once
  81   80  # they're all clean, replace the dependency of the lint target
  82   81  # with SUBDIRS.  Also (sigh) deal with the commented-out build lines
  83   82  # for the lint rule.
  84   83  LINTSUBDIRS=    bootconfchk ilbadm in.rdisc in.routed in.talkd inetadm \
  85   84                  inetconv ipmpstat ipqosconf ipsecutils kssl/kssladm \
  86   85                  kssl/ksslcfg nwamadm nwamcfg ping routeadm sppptun traceroute \
  87   86                  wificonfig
  88   87  # And as programs are verified not to attempt to write into constants,
  89   88  # -xstrconst should be used to ensure they stay that way.
  90   89  CONSTCLEAN=
  91   90  
  92   91  include ../../Makefile.cmd
  93   92  ROOTMANIFESTDIR=        $(ROOTSVCNETWORK)
  94   93  $(ROOTMANIFEST)         := FILEMODE= 444
  95   94  include ../Makefile.cmd-inet
  96   95  
  97   96  ROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
  98   97  ROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
  99   98  
 100   99  COMMONOBJS=     addr_match.o kcmd.o store_forw_creds.o
 101  100  COMMONSRCS=     $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c)
 102  101  SRCS+=          $(COMMONSRCS)
 103  102  
 104  103  CERRWARN += -_gcc=-Wno-implicit-function-declaration
 105  104  CERRWARN += -_gcc=-Wno-uninitialized
 106  105  CERRWARN += -_gcc=-Wno-unused-variable
 107  106  CERRWARN += -_gcc=-Wno-unused-function
 108  107  CERRWARN += -_gcc=-Wno-parentheses
 109  108  CERRWARN += -_gcc=-Wno-char-subscripts
 110  109  CERRWARN += -_gcc=-Wno-extra
 111  110  CERRWARN += -_gcc=-Wno-address
 112  111  
 113  112  #
 114  113  # Message catalog
 115  114  #
 116  115  POFILES=        6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po \
 117  116                  soconfig.po
 118  117  POFILE=         usr.sbin.po
 119  118  
 120  119  all:=           TARGET= all
 121  120  install:=       TARGET= install
 122  121  clean:=         TARGET= clean
 123  122  clobber:=       TARGET= clobber
 124  123  lint:=          TARGET= lint
 125  124  _msg:=          TARGET= _msg
 126  125  
 127  126  CLOBBERFILES += $(ROOTFS_PROG) $(PROG)
 128  127  CLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS) \
 129  128                  $(K5TELNETOBJS)
 130  129  
 131  130  CPPFLAGS +=     -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I
 132  131  
 133  132  include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
 134  133  K5LIBS=
 135  134  
 136  135  # Eventually just plain CFLAGS should be += -v, but not until all in
 137  136  # PROGS are lint clean.
 138  137  $(LINTCLEAN)            :=      CFLAGS += $(CCVERBOSE)
 139  138  $(CONSTCLEAN)           :=      CFLAGS += $(XSTRCONST)
 140  139  
 141  140  $(SYNCPROG)             :=      LDLIBS += -ldlpi
 142  141  $(SOCKETPROG)           :=      LDLIBS += -lsocket
 143  142  $(NSLPROG)              :=      LDLIBS += -lnsl
 144  143  $(AUDITPROG)            :=      LDLIBS += -lbsm
 145  144  $(PAMPROG)              :=      LDLIBS += -lpam
 146  145  $(RPCSVCPROG)           :=      LDLIBS += -lrpcsvc
 147  146  $(K5PROGS)              :=      LDFLAGS += $(KRUNPATH) \
 148  147                                  -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
 149  148  $(K5PROGS)              :=      K5LIBS=  -lmech_krb5
 150  149  $(K5PROGS)              :=      CPPFLAGS += -I$(SRC)/head \
 151  150                                  -I$(SRC)/uts/common/ \
 152  151                                  -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
 153  152                                  -I$(SRC)/lib/gss_mechs/mech_krb5/include \
 154  153                                  -I$(SRC)/lib/pam_modules/krb5
 155  154  LDLIBS +=       $(K5LIBS)
 156  155  $(TSNETPROG)            :=      LDLIBS += -ltsnet
 157  156  $(DLADMPROG)            :=      LDLIBS += -ldladm
 158  157  
 159  158  in.rarpd                :=      LDLIBS += -linetutil -ldlpi
 160  159  if_mpadm                :=      LDLIBS += -linetutil -lipmp
 161  160  if_mpadm.po             :=      XGETFLAGS += -a
 162  161  route                   :=      CPPFLAGS += -DNDEBUG
 163  162  ndd                     :=      LDLIBS += -ldladm -lipadm
 164  163  in.comsat               :=      LDFLAGS += $(MAPFILE.NGB:%=-M%)
 165  164  
 166  165  .KEEP_STATE:
 167  166  
 168  167  .PARALLEL:
 169  168  
 170  169  all: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp
 171  170  
 172  171  #
 173  172  # message catalog
 174  173  #
 175  174  _msg: $(MSGSUBDIRS) $(POFILE)
 176  175  
 177  176  syncutil: $(SYNCPROG)
 178  177  
 179  178  $(POFILE): $(POFILES)
 180  179          $(RM) $@
 181  180          cat $(POFILES) > $@
 182  181  
 183  182  %.o: $(CMDINETCOMMONDIR)/%.c
 184  183          $(COMPILE.c) -o $@ $<
 185  184  
 186  185  in.telnetd: $(K5TELNETOBJS)
 187  186          $(LINK.c) $(K5TELNETOBJS) -o $@ $(LDLIBS)
 188  187          $(POST_PROCESS)
 189  188  
 190  189  in.rlogind: $(K5RLOGINOBJS) $(COMMONOBJS)
 191  190          $(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
 192  191          $(POST_PROCESS)
 193  192  
 194  193  in.rshd: $(K5RSHDOBJS) $(COMMONOBJS)
 195  194          $(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
 196  195          $(POST_PROCESS)
 197  196  
 198  197  in.tftpd: $(TFTPDOBJS)
 199  198          $(LINK.c) $(TFTPDOBJS) -o $@ $(LDLIBS)
 200  199          $(POST_PROCESS)
 201  200  
 202  201  tftpsubs.o: $(OTHERSRC)
 203  202          $(COMPILE.c) $(OTHERSRC) -o $@
 204  203          $(POST_PROCESS_O)
 205  204  
 206  205  $(ROOTUSRSBINLINKS):
 207  206          -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
 208  207  
 209  208  install: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \
 210  209          $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \
 211  210          $(ROOTMANIFEST) $(ROOTSVCMETHOD) THIRDPARTYLICENSE.arp
 212  211  
 213  212  THIRDPARTYLICENSE.arp: arp.c
 214  213          $(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@
 215  214  
 216  215  CLOBBERFILES += THIRDPARTYLICENSE.arp
 217  216  
 218  217  #
 219  218  # The reason this rule checks for the existence of the
 220  219  # Makefile is that some of the directories do not exist
 221  220  # in our exportable source builds.
 222  221  #
 223  222  $(SUBDIRS): FRC
 224  223          @if [ -f $@/Makefile  ]; then \
 225  224                  cd $@; pwd; $(MAKE) $(TARGET); \
 226  225          else \
 227  226                  true; \
 228  227          fi
 229  228  
 230  229  FRC:
 231  230  
 232  231  check:  $(CHKMANIFEST)
 233  232  
 234  233  clean: $(SUBDIRS) clean_local
 235  234  clean_local:
 236  235          $(RM) $(CLEANFILES)
 237  236  
 238  237  clobber: $(SUBDIRS) clobber_local
 239  238  clobber_local: clean_local
 240  239          $(RM) $(CLOBBERFILES)
 241  240  
 242  241  lint: $(LINTSUBDIRS)
 243  242          $(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -ldladm
 244  243          $(LINT.c) arp.c $(LDLIBS) -lsocket -lnsl
 245  244          @# $(LINT.c) in.rexecd.c $(LDLIBS) -lbsm -lpam
 246  245          $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
 247  246                  -I$(SRC)/head -I$(SRC)/uts/common/ \
 248  247                  -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
 249  248                  -I$(SRC)/lib/gss_mechs/mech_krb5/include \
 250  249                  -I$(SRC)/lib/pam_modules/krb5 \
 251  250                  in.rlogind.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
 252  251          $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
 253  252                  -I$(SRC)/head -I$(SRC)/uts/common/ \
 254  253                  -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
 255  254                  -I$(SRC)/lib/gss_mechs/mech_krb5/include \
 256  255                  -I$(SRC)/lib/pam_modules/krb5 \
 257  256                  in.rshd.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
 258  257          $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \
 259  258                  -erroff=E_GLOBAL_COULD_BE_STATIC2 \
 260  259                  -I$(SRC)/head -I$(SRC)/uts/common/ \
 261  260                  -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
 262  261                  -I$(SRC)/lib/gss_mechs/mech_krb5/include \
 263  262                  -I$(SRC)/lib/pam_modules/krb5 \
 264  263                  in.telnetd.c $(LDLIBS) -lbsm -lpam -lsocket -lnsl
 265  264          $(LINT.c) if_mpadm.c $(LDLIBS) -lsocket -lnsl -lipmp -linetutil
 266  265          $(LINT.c) ipaddrsel.c $(LDLIBS) -lsocket -lnsl
 267  266          $(LINT.c) route.c $(LDLIBS) -lsocket -lnsl -ltsnet
 268  267          $(LINT.c) syncinit.c $(LDLIBS) -ldlpi
 269  268          $(LINT.c) syncloop.c $(LDLIBS) -ldlpi
 270  269          $(LINT.c) syncstat.c $(LDLIBS) -ldlpi
 271  270          $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 in.rarpd.c $(LDLIBS) \
 272  271              -lsocket -lnsl
 273  272          $(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \
 274  273              -lsocket -lnsl
  
    | 
      ↓ open down ↓ | 
    231 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX