Merge commit 'b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90'
[unleashed.git] / usr / src / cmd / listen / Makefile
blob0212f9d83e3a65ab0587a0f12671904261caeb81
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 PROG= listen nlps_server
28 DBGOBJ = doprnt.o
29 DBGSRC = doprnt.c
31 LSOBJS = listen.o lslog.o lsdbf.o lsdata.o nstoa.o nlsaddr.o
33 NLPSOBJS = nlps_serv.o lsdbf.o lssmb.o nstoa.o lslog.o lsdata.o
35 OBJS= $(LSOBJS) $(NLPSOBJS)
36 LSSRC= $(LSOBJS:%.o=%.c)
37 NLPSSRC= $(NLPSOBJS:%.o=%.c)
38 SRCS= $(LSSRC) $(NLPSSRC)
40 include ../Makefile.cmd
42 LIBSAFD = $(ROOTLIB)/saf
43 NETD = $(ROOT)/usr/net
44 NETNLSD = $(NETD)/nls
46 # Don"t re-install /usr/lib/saf/ and /usr/net, Targetdirs installs them
47 #DIRS= $(LIBSAFD) $(NETD) $(NETNLSD)
48 DIRS= $(NETNLSD)
49 ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%)
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
55 LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
56 FILEMODE= 0755
58 CERRWARN += -Wno-implicit-function-declaration
59 CERRWARN += -Wno-unused-variable
60 CERRWARN += -Wno-empty-body
61 CERRWARN += -Wno-parentheses
62 CERRWARN += -Wno-uninitialized
64 $(LIBSAFD)/% : %
65 $(INS.file)
67 .KEEP_STATE:
69 all: $(PROG)
71 listen: $(LSOBJS) $(MAPFILE.NGB)
72 $(LINK.c) $(LSOBJS) -o $@ $(LDLIBS)
73 $(POST_PROCESS)
75 nlps_server: $(NLPSOBJS) $(MAPFILE.NGB)
76 $(LINK.c) $(NLPSOBJS) -o $@ $(LDLIBS)
77 $(POST_PROCESS)
79 install: all $(DIRS) $(ROOTSAFPROG)
80 $(RM) $(ROOT)/usr/net/nls/listen
81 -$(SYMLINK) ../../lib/saf/listen $(ROOT)/usr/net/nls/listen
82 $(RM) $(ROOT)/usr/net/nls/nlps_server
83 -$(SYMLINK) ../../lib/saf/nlps_server $(ROOT)/usr/net/nls/nlps_server
85 $(DIRS):
86 $(INS.dir)
88 clean:
89 $(RM) $(OBJS)
91 include ../Makefile.targ