xref: /titanic_50/usr/src/cmd/cmd-inet/lib/nwamd/Makefile (revision c3a558e7c77127215b010652905be7916ec5a080)
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 2010 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# usr/src/cmd/cmd-inet/lib/nwamd/Makefile
27#
28
29# Needed for ROOTFS_LIBDIR definition
30include		../../../../lib/Makefile.lib
31
32PROG=		nwamd
33OBJS=		conditions.o dlpi_events.o door_if.o enm.o\
34		events.o known_wlans.o llp.o loc.o logging.o\
35		main.o ncp.o ncu.o ncu_phys.o ncu_ip.o objects.o\
36		routing_events.o sysevent_events.o util.o
37SRCS=		$(OBJS:%.o=%.c)
38HEADERS=	conditions.h events.h known_wlans.h llp.h ncp.h ncu.h\
39		objects.h
40LOCFILES=	create_loc_auto create_loc_nonet
41NONETLOCFILES=	ipf.conf.dfl ipf6.conf.dfl
42
43ROOTCFGDIR=	$(ROOTETC)/nwam
44ROOTLOCDIR=	$(ROOTCFGDIR)/loc
45NONETLOCDIR=	$(ROOTLOCDIR)/NoNet
46LOCDIRS=	$(NONETLOCDIR)
47ROOTCFGFILES=	$(LOCFILES:%=$(ROOTLOCDIR)/%) \
48		$(NONETLOCFILES:%=$(NONETLOCDIR)/%)
49
50include		../../../Makefile.cmd
51
52$(ROOTCFGFILES) := FILEMODE= 644
53
54POFILE=		$(PROG).po
55
56ROOTCMDDIR=	$(ROOTFS_LIBDIR)/inet
57
58LDLIBS +=	-ldhcpagent -ldhcputil -ldladm -ldlpi -lgen \
59		-linetcfg -linetutil -lkstat -lnsl -lnvpair -lnwam \
60		-lsecdb -lscf -lsocket -lsysevent -lumem -luutil
61
62#
63# Instrument with CTF data to ease debugging.
64#
65CTFCONVERT_HOOK = && $(CTFCONVERT_O)
66CTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS)
67$(OBJS) := CFLAGS += $(CTF_FLAGS)
68
69.KEEP_STATE:
70
71.PARALLEL:
72
73all: $(PROG)
74
75$(PROG): $(OBJS)
76	$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
77	$(POST_PROCESS)
78
79install: $(ROOTCMD) $(ROOTLOCDIR) $(ROOTCFGFILES)
80
81check:  $(SRCS) $(HEADERS)
82	$(CSTYLE) -cpP $(SRCS) $(HEADERS)
83
84$(ROOTCMD): all
85
86clean:
87	$(RM) $(OBJS)
88
89lint:	lint_SRCS
90
91$(ROOTCFGDIR):
92	$(INS.dir)
93
94$(ROOTLOCDIR): $(ROOTCFGDIR)
95	$(INS.dir)
96
97$(LOCDIRS): $(ROOTLOCDIR)
98	$(INS.dir)
99
100$(ROOTLOCDIR)/%: $(ROOTLOCDIR) %
101	$(INS.file)
102
103$(NONETLOCDIR)/%: $(NONETLOCDIR) %
104	$(INS.file)
105
106include		../../../Makefile.targ
107include		../../Makefile.msg
108