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# 23# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26PROG= listen nlps_server 27 28DBGOBJ = doprnt.o 29DBGSRC = doprnt.c 30 31LSOBJS = listen.o lslog.o lsdbf.o lsdata.o nstoa.o nlsaddr.o 32 33NLPSOBJS = nlps_serv.o lsdbf.o lssmb.o nstoa.o lslog.o lsdata.o 34 35OBJS= $(LSOBJS) $(NLPSOBJS) 36LSSRC= $(LSOBJS:%.o=%.c) 37NLPSSRC= $(NLPSOBJS:%.o=%.c) 38SRCS= $(LSSRC) $(NLPSSRC) 39 40include ../Makefile.cmd 41 42LIBSAFD = $(ROOTLIB)/saf 43NETD = $(ROOT)/usr/net 44NETNLSD = $(NETD)/nls 45 46# Don"t re-install /usr/lib/saf/ and /usr/net, Targetdirs installs them 47#DIRS= $(LIBSAFD) $(NETD) $(NETNLSD) 48DIRS= $(NETNLSD) 49ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%) 50 51# If machine name and /etc/issue file need to be printed 52# before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME 53# If debug is needed, then: CPPFLAGS += -DDEBUG 54 55LDLIBS += -lnsl 56LDFLAGS += $(MAPFILE.NGB:%=-M%) 57LINTFLAGS = -b -x 58FILEMODE= 0755 59 60$(LIBSAFD)/% : % 61 $(INS.file) 62 63.KEEP_STATE: 64 65all: $(PROG) 66 67listen: $(LSOBJS) $(MAPFILE.NGB) 68 $(LINK.c) $(LSOBJS) -o $@ $(LDLIBS) 69 $(POST_PROCESS) 70 71nlps_server: $(NLPSOBJS) $(MAPFILE.NGB) 72 $(LINK.c) $(NLPSOBJS) -o $@ $(LDLIBS) 73 $(POST_PROCESS) 74 75install: all $(DIRS) $(ROOTSAFPROG) 76 $(RM) $(ROOT)/usr/net/nls/listen 77 -$(SYMLINK) ../../lib/saf/listen $(ROOT)/usr/net/nls/listen 78 $(RM) $(ROOT)/usr/net/nls/nlps_server 79 -$(SYMLINK) ../../lib/saf/nlps_server $(ROOT)/usr/net/nls/nlps_server 80 81$(DIRS): 82 $(INS.dir) 83 84clean: 85 $(RM) $(OBJS) 86 87lint: 88 $(LINT.c) $(LSSRC) 89 $(LINT.c) $(NLPSSRC) 90 91include ../Makefile.targ 92