Makefile revision 12500:fd1a1e5c5ff0
1234353Sdim#
2234353Sdim# CDDL HEADER START
3234353Sdim#
4234353Sdim# The contents of this file are subject to the terms of the
5234353Sdim# Common Development and Distribution License (the "License").
6234353Sdim# You may not use this file except in compliance with the License.
7234353Sdim#
8234353Sdim# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9234353Sdim# or http://www.opensolaris.org/os/licensing.
10234353Sdim# See the License for the specific language governing permissions
11234353Sdim# and limitations under the License.
12234353Sdim#
13234353Sdim# When distributing Covered Code, include this CDDL HEADER in each
14234353Sdim# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15234353Sdim# If applicable, add the following below this CDDL HEADER, with the
16226584Sdim# fields enclosed by brackets "[]" replaced with your own identifying
17234353Sdim# information: Portions Copyright [yyyy] [name of copyright owner]
18226584Sdim#
19226584Sdim# CDDL HEADER END
20226584Sdim#
21234353Sdim# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
22226584Sdim#
23226584Sdim
24226584SdimILBD=		ilbd
25226584SdimPROG=		$(ILBD)
26234353SdimMANIFEST=	ilbd.xml
27226584Sdim
28226584SdimILBD_OBJS=	ilbd_main.o ilbd_support.o ilbd_sg.o ilbd_rules.o ilbd_hc.o \
29234353Sdim		ilbd_nat.o ilbd_scf.o
30234353SdimILBD_SRCS=	$(ILBD_OBJS:%.o=%.c)
31234353SdimHDRS=		ilbd.h
32234353Sdim
33234353SdimLIST_OBJS=	list.o
34234353SdimLIST_SRCS=	$(LIST_OBJS:%.o=../../../uts/common/os/%.c) 
35234353Sdim
36234353SdimLIB_INC=	$(SRC)/lib/libilb/common
37234353Sdim
38239462SdimOBJS=		$(ILBD_OBJS) $(LIST_OBJS)
39234353SdimSRCS=		$(ILBD_SRCS) $(LIST_SRCS)
40249423Sdim
41239462SdimILBSUBDIRS=	ilb
42239462Sdim
43239462Sdiminclude		../../../Makefile.cmd
44239462Sdiminclude		../../../Makefile.ctf
45239462Sdiminclude		../../Makefile.cmd-inet
46244628Sdim
47244628SdimROOTMANIFESTDIR=	$(ROOTSVCNETWORK)/loadbalancer
48263508Sdim
49263508SdimCHECKHDRS=	$(HDRS:%.h=%.check)
50263508Sdim
51263508SdimCPPFLAGS +=	-D_FILE_OFFSET_BITS=64 -I$(CMDINETCOMMONDIR) -D_REENTRANT
52234353SdimCPPFLAGS +=	-I$(LIB_INC)
53234353SdimCPPFLAGS +=	-I$(SRC)/uts/common
54234353Sdim
55234353SdimC99MODE =      $(C99_ENABLE)
56234353Sdim
57234353Sdim# I18n
58234353SdimPOFILE =        $(ILBD).po
59234353SdimPOFILES =       $(ILBD_SRCS:%.c=%.po)
60234353Sdim
61234353Sdimall:=		TARGET= all
62234353Sdiminstall:=	TARGET= install
63234353Sdimclean:=		TARGET= clean
64234353Sdimclobber:=	TARGET= clobber
65234353Sdimlint:=		TARGET= lint
66234353Sdim
67234353Sdim
68234353SdimLDLIBS +=	-lsocket -lsecdb -lnsl -lilb -lscf -linetutil -lbsm
69234353Sdim
70244628Sdim.KEEP_STATE:
71244628Sdim
72263508Sdimall:		$(PROG)
73239462Sdim
74234353Sdim$(ILBD): 	$(OBJS)
75234353Sdim		$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
76239462Sdim		$(POST_PROCESS)
77239462Sdim
78239462Sdiminclude ../Makefile.lib
79239462Sdim
80239462Sdiminstall:	all $(ROOTLIBINETPROG) $(ETCILBDFILES) $(ROOTMANIFEST)
81239462Sdim
82239462Sdimcheck:	$(CHKMANIFEST) $(CHECKHDRS)
83239462Sdim
84263508Sdimclean:
85263508Sdim	$(RM) $(OBJS)
86263508Sdim
87263508Sdimlint:
88263508Sdim	$(LINT.c) $(ILBD_SRCS) $(LDLIBS)
89263508Sdim
90263508Sdim$(POFILE):	$(POFILES)
91234353Sdim		$(RM) $@
92234353Sdim		$(CAT) $(POFILES) > $@
93234353Sdim
94234353Sdimall install clean clobber lint: $(ILBSUBDIRS)
95234353Sdim
96226584Sdiminclude		../../../Makefile.targ
97234353Sdim
98234353Sdim# the below is needed to get list.o built
99234353Sdim%.o: ../../../../uts/common/os/%.c
100234353Sdim	$(COMPILE.c) -o $@ $<
101226584Sdim	$(POST_PROCESS_O)
102226584Sdim
103234353Sdim$(ILBSUBDIRS): FRC
104234353Sdim	@cd $@; pwd; $(MAKE) $(TARGET)
105234353Sdim
106226584SdimFRC:
107234353Sdim