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