Makefile revision 11484:885594e37e36
1193323Sed#
2193323Sed# CDDL HEADER START
3193323Sed#
4193323Sed# The contents of this file are subject to the terms of the
5193323Sed# Common Development and Distribution License (the "License").
6193323Sed# You may not use this file except in compliance with the License.
7193323Sed#
8193323Sed# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9193323Sed# or http://www.opensolaris.org/os/licensing.
10193323Sed# See the License for the specific language governing permissions
11193323Sed# and limitations under the License.
12193323Sed#
13193323Sed# When distributing Covered Code, include this CDDL HEADER in each
14193323Sed# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15193323Sed# If applicable, add the following below this CDDL HEADER, with the
16193323Sed# fields enclosed by brackets "[]" replaced with your own identifying
17193323Sed# information: Portions Copyright [yyyy] [name of copyright owner]
18193323Sed#
19193323Sed# CDDL HEADER END
20198090Srdivacky#
21198090Srdivacky# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
22193323Sed# Use is subject to license terms.
23198090Srdivacky#
24193323Sed
25193323SedPROG=		ilbadm
26193323Sed
27193323SedILB_OBJS =	ilbadm.o ilbadm_sg.o ilbadm_rules.o ilbadm_hc.o
28193323SedILB_OBJS +=	ilbadm_subr.o ilbadm_import.o ilbadm_nat.o ilbadm_stats.o
29193323SedLIST_OBJS =	list.o
30193323SedOBJS =		$(ILB_OBJS) $(LIST_OBJS)
31193323Sed
32193323SedILB_SRCS=	$(ILB_OBJS:.o=.c)
33193323SedLIST_SRCS=	$(LIST_OBJS:%.o=../../../../uts/common/os/%.c)
34193323Sed
35193323SedSRCS=		$(ILB_SRC) $(LIST_SRCS)
36193323Sed
37193323Sedinclude	../../../Makefile.cmd
38193323Sedinclude ../../../Makefile.ctf
39193323Sedinclude ../../Makefile.cmd-inet
40193323Sed
41193323SedLDLIBS +=	-lsocket -lnsl -lilb -linetutil -lkstat
42193323SedCPPFLAGS +=	-I$(SRC)/lib/libilb/common -I$(SRC)/uts/common
43193323Sed
44193323SedC99MODE =	$(C99_ENABLE)
45193323Sed
46193323SedPOFILES =	$(ILB_OBJS:%.o=%.po)
47193323SedPOFILE =	$(PROG)_all.po
48193323Sed
49193323Sed.KEEP_STATE:
50193323Sed.PARALLEL:
51193323Sed
52193323Sedall:	$(PROG)
53193323Sed
54193323Sed$(PROG): $(OBJS)
55193323Sed	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
56193323Sed	$(POST_PROCESS)
57193323Sed
58193323Sed$(POFILE): $(POFILES)
59193323Sed	$(RM) $@
60193323Sed	cat $(POFILES) > $@
61193323Sed
62193323Sedinstall: all $(ROOTUSRSBINPROG)
63193323Sed
64193323Sedclean:	
65193323Sed	$(RM) $(OBJS) $(POFILES)
66193323Sed
67193323Sedlint:	$(ILB_SRCS)
68193323Sed	$(LINT.c) $(ILB_SRCS) $(LDLIBS)
69218893Sdim
70218893Sdimcheck:	$(ILB_SRCS) $(PROG).h
71218893Sdim	$(CSTYLE) -pP $(ILB_SRCS) $(PROG).h
72218893Sdim	$(HDRCHK) $(PROG).h
73218893Sdim
74218893Sdiminclude ../../../Makefile.targ
75218893Sdim
76218893Sdim# the below is needed to get list.o built
77218893Sdim%.o: ../../../../uts/common/os/%.c
78218893Sdim	$(COMPILE.c) -o $@ $<
79218893Sdim	$(POST_PROCESS_O)
80218893Sdim