xref: /titanic_50/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile (revision 69b3e10436272b0970d58743de375d0dd61046ce)
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 2009 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.cmd-inet
46
47ROOTMANIFESTDIR=	$(ROOTSVCNETWORK)/loadbalancer
48
49CHECKHDRS=	$(HDRS:%.h=%.check)
50
51CPPFLAGS +=	-D_FILE_OFFSET_BITS=64 -I$(CMDINETCOMMONDIR) -D_REENTRANT
52CPPFLAGS +=	-I$(LIB_INC)
53CPPFLAGS +=	-I$(SRC)/uts/common
54
55C99MODE =      $(C99_ENABLE)
56
57# I18n
58POFILE =        $(ILBD).po
59POFILES =       $(ILBD_SRCS:%.c=%.po)
60
61all:=		TARGET= all
62install:=	TARGET= install
63clean:=		TARGET= clean
64clobber:=	TARGET= clobber
65lint:=		TARGET= lint
66
67# used for debugging ONLY:
68
69CFLAGS =		-g -K pic
70STRIP_STABS=		:
71CTFCVTFLAGS +=		-g
72
73
74LDLIBS +=	-lsocket -lsecdb -lnsl -lilb -lscf -linetutil -lbsm
75
76.KEEP_STATE:
77
78all:		$(PROG)
79
80$(ILBD): 	$(OBJS)
81		$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
82		$(POST_PROCESS)
83
84include ../Makefile.lib
85
86install:	all $(ROOTLIBINETPROG) $(ETCILBDFILES) $(ROOTMANIFEST)
87
88check:	$(CHKMANIFEST) $(CHECKHDRS)
89
90clean:
91	$(RM) $(OBJS)
92
93lint:
94	$(LINT.c) $(ILBD_SRCS) $(LDLIBS)
95
96$(POFILE):	$(POFILES)
97		$(RM) $@
98		$(CAT) $(POFILES) > $@
99
100all install clean clobber lint: $(ILBSUBDIRS)
101
102include		../../../Makefile.targ
103
104# the below is needed to get list.o built
105%.o: ../../../../uts/common/os/%.c
106	$(COMPILE.c) -o $@ $<
107	$(POST_PROCESS_O)
108
109$(ILBSUBDIRS): FRC
110	@cd $@; pwd; $(MAKE) $(TARGET)
111
112FRC:
113