move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / cmd / listen / Makefile
blob9292ab1d56fba55f7a044de964fdced4c0242820
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 # Copyright (c) 2018, Joyent, Inc.
28 PROG= listen nlps_server
30 DBGOBJ = doprnt.o
31 DBGSRC = doprnt.c
33 LSOBJS = listen.o lslog.o lsdbf.o lsdata.o nstoa.o nlsaddr.o
35 NLPSOBJS = nlps_serv.o lsdbf.o lssmb.o nstoa.o lslog.o lsdata.o
37 OBJS= $(LSOBJS) $(NLPSOBJS)
38 LSSRC= $(LSOBJS:%.o=%.c)
39 NLPSSRC= $(NLPSOBJS:%.o=%.c)
40 SRCS= $(LSSRC) $(NLPSSRC)
42 include ../Makefile.cmd
44 LIBSAFD = $(ROOT)/usr/lib/saf
45 NETD = $(ROOT)/usr/net
46 NETNLSD = $(NETD)/nls
48 # Don"t re-install /usr/lib/saf/ and /usr/net, Targetdirs installs them
49 #DIRS= $(LIBSAFD) $(NETD) $(NETNLSD)
50 DIRS= $(NETNLSD)
51 ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%)
53 # If machine name and /etc/issue file need to be printed
54 # before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME
55 # If debug is needed, then: CPPFLAGS += -DDEBUG
57 LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
58 FILEMODE= 0755
60 CERRWARN += -Wno-implicit-function-declaration
61 CERRWARN += -Wno-unused-variable
62 CERRWARN += -Wno-empty-body
63 CERRWARN += -Wno-parentheses
64 CERRWARN += -Wno-uninitialized
66 # not linted
67 SMATCH=off
69 $(LIBSAFD)/% : %
70 $(INS.file)
72 .KEEP_STATE:
74 all: $(PROG)
76 listen: $(LSOBJS) $(MAPFILE.NGB)
77 $(LINK.c) $(LSOBJS) -o $@ $(LDLIBS)
78 $(POST_PROCESS)
80 nlps_server: $(NLPSOBJS) $(MAPFILE.NGB)
81 $(LINK.c) $(NLPSOBJS) -o $@ $(LDLIBS)
82 $(POST_PROCESS)
84 install: all $(DIRS) $(ROOTSAFPROG)
85 $(RM) $(ROOT)/usr/net/nls/listen
86 -$(SYMLINK) ../../lib/saf/listen $(ROOT)/usr/net/nls/listen
87 $(RM) $(ROOT)/usr/net/nls/nlps_server
88 -$(SYMLINK) ../../lib/saf/nlps_server $(ROOT)/usr/net/nls/nlps_server
90 $(DIRS):
91 $(INS.dir)
93 clean:
94 $(RM) $(OBJS)
96 include ../Makefile.targ