xref: /titanic_51/usr/src/cmd/cmd-inet/usr.lib/ilbd/Makefile (revision 9d2159663a6316391e58ae8fc8a1e1a63dc9789c)
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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
22#
23
24ILBD=		ilbd
25PROG=		$(ILBD)
26MANIFEST=	ilbd.xml
27
28ILBD_OBJS=	ilbd_main.o ilbd_support.o ilbd_sg.o ilbd_rules.o ilbd_hc.o \
29		ilbd_nat.o ilbd_scf.o
30ILBD_SRCS=	$(ILBD_OBJS:%.o=%.c)
31HDRS=		ilbd.h
32
33LIST_OBJS=	list.o
34LIST_SRCS=	$(LIST_OBJS:%.o=../../../uts/common/os/%.c)
35
36LIB_INC=	$(SRC)/lib/libilb/common
37
38OBJS=		$(ILBD_OBJS) $(LIST_OBJS)
39SRCS=		$(ILBD_SRCS) $(LIST_SRCS)
40
41ILBSUBDIRS=	ilb
42
43include		../../../Makefile.cmd
44include		../../../Makefile.ctf
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
68LDLIBS +=	-lsocket -lsecdb -lnsl -lilb -lscf -linetutil -lbsm
69
70.KEEP_STATE:
71
72all:		$(PROG)
73
74$(ILBD): 	$(OBJS)
75		$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
76		$(POST_PROCESS)
77
78include ../Makefile.lib
79
80install:	all $(ROOTLIBINETPROG) $(ETCILBDFILES) $(ROOTMANIFEST)
81
82check:	$(CHKMANIFEST) $(CHECKHDRS)
83
84clean:
85	$(RM) $(OBJS)
86
87lint:
88	$(LINT.c) $(ILBD_SRCS) $(LDLIBS)
89
90$(POFILE):	$(POFILES)
91		$(RM) $@
92		$(CAT) $(POFILES) > $@
93
94all install clean clobber lint: $(ILBSUBDIRS)
95
96include		../../../Makefile.targ
97
98# the below is needed to get list.o built
99%.o: ../../../../uts/common/os/%.c
100	$(COMPILE.c) -o $@ $<
101	$(POST_PROCESS_O)
102
103$(ILBSUBDIRS): FRC
104	@cd $@; pwd; $(MAKE) $(TARGET)
105
106FRC:
107