Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
# cmd/cmd-inet/usr.lib/in.dhcpd/%M%
#
CMN_DIR = $(SRC)/common/net/dhcp
NSU_DIR = $(ROOTLIBINET)/dhcp/nsu
PROG = in.dhcpd
MANIFEST= dhcp-server.xml
LOCAL_OBJS = bootp.o dhcp.o dhcptab.o encode.o generic.o hash.o icmp.o \
interfaces.o logging.o main.o misc.o per_dnet.o relay.o
LOCAL_SRCS = $(LOCAL_OBJS:%.o=%.c)
CMN_OBJS = scan.o ipv4_sum.o
CMN_SRCS = $(CMN_OBJS:%.o=$(CMN_DIR)/%.c)
SRCS = $(LOCAL_SRCS) $(CMN_SRCS)
OBJS = $(LOCAL_OBJS) $(CMN_OBJS)
include ../../../Makefile.cmd
ROOTMANIFESTDIR= $(ROOTSVCNETWORK)
$(ROOTMANIFEST) := FILEMODE= 444
CPPFLAGS += -DNDEBUG -DNPROBE -D_REENTRANT -I./ -I$(CMN_DIR)
LINTFLAGS += -u
LDFLAGS += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu
LDLIBS += $(NSU_DIR)/rfc2136.so.1 -lrt -ldhcpsvc -ldhcputil -linetutil \
-lsocket -lnsl -lmtmalloc -lresolv
lint := LDLIBS = $(LDLIBS.cmd) -ldhcpsvc -ldhcputil -linetutil -lsocket -lnsl
#
# Debugging support; toggle on if needed.
#
#CPPFLAGS += -DDEBUG # if used, remove -DNDEBUG above
#CPPFLAGS += -DTNF_DEBUG
#COPTFLAG = -g
#COPTFLAG += -xprofile=func
# for messaging catalog. No messages are present in CMN_DIR sources.
POFILES = $(LOCAL_OBJS:%.o=%.po)
XGETFLAGS += -a -x in.dhcpd.xcl
.PARALLEL: $(OBJS)
.WAIT: $(PROG)
.KEEP_STATE:
all: $(PROG)
$(PROG): $(OBJS)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
include ../Makefile.lib
install: all $(ROOTLIBINETPROG) $(ROOTMANIFEST)
%.o: $(CMN_DIR)/%.c
$(COMPILE.c) $(OUTPUT_OPTION) $<
$(POST_PROCESS_O)
$(ROOTMANIFEST): $(ROOTMANIFESTDIR)
$(ROOTMANIFESTDIR):
$(INS.dir)
$(ROOTMANIFESTDIR)/%: %
$(INS.file)
$(POFILE): $(POFILES)
$(RM) $@
$(CAT) $(POFILES) > $@
check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS)
lint: lint_SRCS
include ../../../Makefile.targ