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 28CMN_DIR = $(SRC)/common/net/dhcp 29NSU_DIR = $(ROOTLIBINET)/dhcp/nsu 30 31PROG = in.dhcpd 32MANIFEST= dhcp-server.xml 33 34LOCAL_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 36LOCAL_SRCS = $(LOCAL_OBJS:%.o=%.c) 37 38CMN_OBJS = ipv4_sum.o 39CMN_SRCS = $(CMN_OBJS:%.o=$(CMN_DIR)/%.c) 40 41SRCS = $(LOCAL_SRCS) $(CMN_SRCS) 42OBJS = $(LOCAL_OBJS) $(CMN_OBJS) 43 44include ../../../Makefile.cmd 45 46ROOTMANIFESTDIR= $(ROOTSVCNETWORK) 47 48CPPFLAGS += -DNDEBUG -DNPROBE -D_REENTRANT -I./ -I$(CMN_DIR) 49# 50# -erroff=E_BAD_FORMAT_STR2 added to workaround bug 6696366 51# 52LINTFLAGS += -u -erroff=E_BAD_FORMAT_STR2 53LDFLAGS += -L$(NSU_DIR) -R/usr/lib/inet/dhcp/nsu $(MAPFILE.NGB:%=-M%) 54LDLIBS += $(NSU_DIR)/rfc2136.so.1 -ldhcpsvc -ldhcputil -linetutil \ 55 -lsocket -lnsl -lmtmalloc -lresolv 56lint := 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. 67POFILES = $(LOCAL_OBJS:%.o=%.po) 68XGETFLAGS += -a -x in.dhcpd.xcl 69 70.PARALLEL: $(OBJS) 71.WAIT: $(PROG) 72.KEEP_STATE: 73 74all: $(PROG) 75 76$(PROG): $(OBJS) $(MAPFILE.NGB) 77 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 78 $(POST_PROCESS) 79 80include ../Makefile.lib 81 82install: 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 92check: $(CHKMANIFEST) 93 94clean: 95 $(RM) $(OBJS) 96 97lint: lint_SRCS 98 99include ../../../Makefile.targ 100