Home | History | Annotate | Download | only in in.dhcpd
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 #
     22 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 # cmd/cmd-inet/usr.lib/in.dhcpd/Makefile
     26 #
     27 
     28 CMN_DIR = $(SRC)/common/net/dhcp
     29 NSU_DIR = $(ROOTLIBINET)/dhcp/nsu
     30 
     31 PROG	= in.dhcpd
     32 MANIFEST= dhcp-server.xml
     33 
     34 LOCAL_OBJS =	bootp.o dhcp.o dhcptab.o encode.o generic.o hash.o icmp.o \
     35 		interfaces.o logging.o main.o misc.o per_dnet.o relay.o
     36 LOCAL_SRCS =	$(LOCAL_OBJS:%.o=%.c)
     37 
     38 CMN_OBJS =	ipv4_sum.o
     39 CMN_SRCS =	$(CMN_OBJS:%.o=$(CMN_DIR)/%.c)
     40 
     41 SRCS =		$(LOCAL_SRCS) $(CMN_SRCS)
     42 OBJS =		$(LOCAL_OBJS) $(CMN_OBJS)
     43 
     44 include ../../../Makefile.cmd
     45 
     46 ROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
     47 
     48 CPPFLAGS  += -DNDEBUG -DNPROBE -D_REENTRANT -I./ -I$(CMN_DIR)
     49 #
     50 # -erroff=E_BAD_FORMAT_STR2 added to workaround bug 6696366 
     51 #
     52 LINTFLAGS += -u -erroff=E_BAD_FORMAT_STR2
     53 LDFLAGS	  += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu $(MAPFILE.NGB:%=-M%)
     54 LDLIBS    += $(NSU_DIR)/rfc2136.so.1 -ldhcpsvc -ldhcputil -linetutil \
     55 	     -lsocket -lnsl -lmtmalloc -lresolv
     56 lint := LDLIBS = $(LDLIBS.cmd) -ldhcpsvc -ldhcputil -linetutil -lsocket -lnsl
     57 
     58 #
     59 # Debugging support; toggle on if needed.
     60 #
     61 #CPPFLAGS += -DDEBUG		# if used, remove -DNDEBUG above
     62 #CPPFLAGS += -DTNF_DEBUG
     63 #COPTFLAG = -g
     64 #COPTFLAG += -xprofile=func
     65 
     66 # for messaging catalog. No messages are present in CMN_DIR sources.
     67 POFILES = $(LOCAL_OBJS:%.o=%.po)
     68 XGETFLAGS += -a -x in.dhcpd.xcl
     69 
     70 .PARALLEL:	$(OBJS)
     71 .WAIT:		$(PROG)
     72 .KEEP_STATE:
     73 
     74 all:		$(PROG)
     75 
     76 $(PROG): 	$(OBJS) $(MAPFILE.NGB)
     77 		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
     78 		$(POST_PROCESS)
     79 
     80 include ../Makefile.lib
     81 
     82 install:	all $(ROOTLIBINETPROG) $(ROOTMANIFEST)
     83 
     84 %.o:		$(CMN_DIR)/%.c
     85 		$(COMPILE.c) $(OUTPUT_OPTION) $<
     86 		$(POST_PROCESS_O)
     87 
     88 $(POFILE):	$(POFILES)
     89 		$(RM)	$@
     90 		$(CAT) $(POFILES) > $@
     91 
     92 check:		$(CHKMANIFEST)
     93 
     94 clean:
     95 		$(RM) $(OBJS)
     96 
     97 lint:		lint_SRCS
     98 
     99 include ../../../Makefile.targ
    100