xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/Makefile (revision 7632:91aa3d8541b5)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
52248Sraf# Common Development and Distribution License (the "License").
62248Sraf# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*7632SNick.Todd@Sun.COM# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
25*7632SNick.Todd@Sun.COM# cmd/cmd-inet/usr.lib/in.dhcpd/Makefile
260Sstevel@tonic-gate#
270Sstevel@tonic-gate
280Sstevel@tonic-gateCMN_DIR = $(SRC)/common/net/dhcp
290Sstevel@tonic-gateNSU_DIR = $(ROOTLIBINET)/dhcp/nsu
300Sstevel@tonic-gate
310Sstevel@tonic-gatePROG	= in.dhcpd
320Sstevel@tonic-gateMANIFEST= dhcp-server.xml
330Sstevel@tonic-gate
340Sstevel@tonic-gateLOCAL_OBJS =	bootp.o dhcp.o dhcptab.o encode.o generic.o hash.o icmp.o \
350Sstevel@tonic-gate		interfaces.o logging.o main.o misc.o per_dnet.o relay.o
360Sstevel@tonic-gateLOCAL_SRCS =	$(LOCAL_OBJS:%.o=%.c)
370Sstevel@tonic-gate
384271SrieCMN_OBJS =	ipv4_sum.o
390Sstevel@tonic-gateCMN_SRCS =	$(CMN_OBJS:%.o=$(CMN_DIR)/%.c)
400Sstevel@tonic-gate
410Sstevel@tonic-gateSRCS =		$(LOCAL_SRCS) $(CMN_SRCS)
420Sstevel@tonic-gateOBJS =		$(LOCAL_OBJS) $(CMN_OBJS)
430Sstevel@tonic-gate
440Sstevel@tonic-gateinclude ../../../Makefile.cmd
450Sstevel@tonic-gate
460Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
470Sstevel@tonic-gate
480Sstevel@tonic-gateCPPFLAGS  += -DNDEBUG -DNPROBE -D_REENTRANT -I./ -I$(CMN_DIR)
49*7632SNick.Todd@Sun.COM#
50*7632SNick.Todd@Sun.COM# -erroff=E_BAD_FORMAT_STR2 added to workaround bug 6696366
51*7632SNick.Todd@Sun.COM#
52*7632SNick.Todd@Sun.COMLINTFLAGS += -u -erroff=E_BAD_FORMAT_STR2
534271SrieLDFLAGS	  += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu $(MAPFILE.NGB:%=-M%)
542248SrafLDLIBS    += $(NSU_DIR)/rfc2136.so.1 -ldhcpsvc -ldhcputil -linetutil \
550Sstevel@tonic-gate	     -lsocket -lnsl -lmtmalloc -lresolv
560Sstevel@tonic-gatelint := LDLIBS = $(LDLIBS.cmd) -ldhcpsvc -ldhcputil -linetutil -lsocket -lnsl
570Sstevel@tonic-gate
580Sstevel@tonic-gate#
590Sstevel@tonic-gate# Debugging support; toggle on if needed.
600Sstevel@tonic-gate#
610Sstevel@tonic-gate#CPPFLAGS += -DDEBUG		# if used, remove -DNDEBUG above
620Sstevel@tonic-gate#CPPFLAGS += -DTNF_DEBUG
630Sstevel@tonic-gate#COPTFLAG = -g
640Sstevel@tonic-gate#COPTFLAG += -xprofile=func
650Sstevel@tonic-gate
660Sstevel@tonic-gate# for messaging catalog. No messages are present in CMN_DIR sources.
670Sstevel@tonic-gatePOFILES = $(LOCAL_OBJS:%.o=%.po)
680Sstevel@tonic-gateXGETFLAGS += -a -x in.dhcpd.xcl
690Sstevel@tonic-gate
700Sstevel@tonic-gate.PARALLEL:	$(OBJS)
710Sstevel@tonic-gate.WAIT:		$(PROG)
720Sstevel@tonic-gate.KEEP_STATE:
730Sstevel@tonic-gate
740Sstevel@tonic-gateall:		$(PROG)
750Sstevel@tonic-gate
764271Srie$(PROG): 	$(OBJS) $(MAPFILE.NGB)
770Sstevel@tonic-gate		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
780Sstevel@tonic-gate		$(POST_PROCESS)
790Sstevel@tonic-gate
800Sstevel@tonic-gateinclude ../Makefile.lib
810Sstevel@tonic-gate
820Sstevel@tonic-gateinstall:	all $(ROOTLIBINETPROG) $(ROOTMANIFEST)
830Sstevel@tonic-gate
840Sstevel@tonic-gate%.o:		$(CMN_DIR)/%.c
850Sstevel@tonic-gate		$(COMPILE.c) $(OUTPUT_OPTION) $<
860Sstevel@tonic-gate		$(POST_PROCESS_O)
870Sstevel@tonic-gate
880Sstevel@tonic-gate$(POFILE):	$(POFILES)
890Sstevel@tonic-gate		$(RM)	$@
900Sstevel@tonic-gate		$(CAT) $(POFILES) > $@
910Sstevel@tonic-gate
920Sstevel@tonic-gatecheck:		$(CHKMANIFEST)
930Sstevel@tonic-gate
940Sstevel@tonic-gateclean:
950Sstevel@tonic-gate		$(RM) $(OBJS)
960Sstevel@tonic-gate
970Sstevel@tonic-gatelint:		lint_SRCS
980Sstevel@tonic-gate
990Sstevel@tonic-gateinclude ../../../Makefile.targ
100