xref: /titanic_44/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile (revision de33058aebd1018422519c8262583a3e5871d75c)
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# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24
25ILBD=		ilbd
26PROG=		$(ILBD)
27MANIFEST=	ilbd.xml
28
29ILBD_OBJS=	ilbd_main.o ilbd_support.o ilbd_sg.o ilbd_rules.o ilbd_hc.o \
30		ilbd_nat.o ilbd_scf.o
31ILBD_SRCS=	$(ILBD_OBJS:%.o=%.c)
32HDRS=		ilbd.h
33
34LIST_OBJS=	list.o
35LIST_SRCS=	$(LIST_OBJS:%.o=../../../uts/common/os/%.c)
36
37LIB_INC=	$(SRC)/lib/libilb/common
38
39OBJS=		$(ILBD_OBJS) $(LIST_OBJS)
40SRCS=		$(ILBD_SRCS) $(LIST_SRCS)
41
42ILBSUBDIRS=	ilb
43
44include		../../../Makefile.cmd
45include		../../../Makefile.ctf
46include		../../Makefile.cmd-inet
47
48ROOTMANIFESTDIR=	$(ROOTSVCNETWORK)/loadbalancer
49
50CHECKHDRS=	$(HDRS:%.h=%.check)
51
52CPPFLAGS +=	-D_FILE_OFFSET_BITS=64 -I$(CMDINETCOMMONDIR) -D_REENTRANT
53CPPFLAGS +=	-I$(LIB_INC)
54CPPFLAGS +=	-I$(SRC)/uts/common
55
56C99MODE =      $(C99_ENABLE)
57
58# I18n
59POFILE =        $(ILBD).po
60POFILES =       $(ILBD_SRCS:%.c=%.po)
61
62all:=		TARGET= all
63install:=	TARGET= install
64clean:=		TARGET= clean
65clobber:=	TARGET= clobber
66lint:=		TARGET= lint
67
68# used for debugging ONLY:
69CTFCVTFLAGS +=		-g
70
71
72LDLIBS +=	-lsocket -lsecdb -lnsl -lilb -lscf -linetutil -lbsm
73
74.KEEP_STATE:
75
76all:		$(PROG)
77
78$(ILBD): 	$(OBJS)
79		$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
80		$(POST_PROCESS)
81
82include ../Makefile.lib
83
84install:	all $(ROOTLIBINETPROG) $(ETCILBDFILES) $(ROOTMANIFEST)
85
86check:	$(CHKMANIFEST) $(CHECKHDRS)
87
88clean:
89	$(RM) $(OBJS)
90
91lint:
92	$(LINT.c) $(ILBD_SRCS) $(LDLIBS)
93
94$(POFILE):	$(POFILES)
95		$(RM) $@
96		$(CAT) $(POFILES) > $@
97
98all install clean clobber lint: $(ILBSUBDIRS)
99
100include		../../../Makefile.targ
101
102# the below is needed to get list.o built
103%.o: ../../../../uts/common/os/%.c
104	$(COMPILE.c) -o $@ $<
105	$(POST_PROCESS_O)
106
107$(ILBSUBDIRS): FRC
108	@cd $@; pwd; $(MAKE) $(TARGET)
109
110FRC:
111