xref: /titanic_41/usr/src/cmd/lms/Makefile (revision 5bbb4db2c3f208d12bf0fd11769728f9e5ba66a2)
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#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26PROG=		lms
27MANIFEST=	lms.xml
28
29include	../Makefile.cmd
30
31LMSOBJS=	ConfigConnection.o     Protocol.o             main.o \
32		LMEConnection.o        ProtocolCompat.o \
33		LMEConnectionCompat.o  glue.o \
34		SyncLib/src/EventUnix.o SyncLib/src/RWLock.o \
35		SyncLib/src/SemaphoreUnix.o SyncLib/src/ThreadUnix.o \
36		heci/FWULCommand.o heci/HECIUnix.o \
37		heci/MNGCommand.o heci/PTHICommand.o \
38		tools/ATNetworkTool.o tools/ATVersion.o \
39		tools/daemonize.o
40
41ROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
42ROOTMETHOD=		$(ROOTLIBSVCMETHOD)/svc-lms
43$(ROOTMANIFEST)		:= FILEMODE= 444
44
45SYNCLIB_SRCDIR=SyncLib/src
46SYNCLIB_HDRDIR=SyncLib/Include
47HECI_DIR=heci
48TOOLS_DIR=tools
49
50CPPFLAGS=	-DBSD_COMP -D_REMOTE_SUPPORT \
51		-I. -I$(SYNCLIB_HDRDIR) -I$(HECI_DIR) -I$(TOOLS_DIR)
52CCFLAGS +=	-compat=5 -features=zla
53CCNEEDED=	-lCrun -lCstd
54$(__GNUC)CCNEEDED = -L$(SFWLIBDIR) -R$(SFWLIBDIR) -lstdc++ -lgcc_s
55LDFLAGS += $(ZIGNORE) -norunpath
56LDLIBS += -lsocket -lnsl
57
58.KEEP_STATE:
59
60all:		$(PROG)
61
62$(PROG):	$(LMSOBJS)
63		$(LINK.cc) -o $@ $(LMSOBJS) $(LDLIBS) -lc
64		$(POST_PROCESS)
65
66%.o:		%.cpp
67		$(COMPILE.cc) $(OUTPUT_OPTION) -o $@ $<
68		$(POST_PROCESS_O)
69
70install:	all $(ROOTLIBPROG) $(ROOTMANIFEST) $(ROOTMETHOD)
71
72check:		$(CHKMANIFEST)
73
74clean:
75		$(RM) $(OBJS) $(LMSOBJS)
76
77include ../Makefile.targ
78
79#
80# we're not linting lms.  it's all C++.
81#
82
83lint:
84