xref: /titanic_41/usr/src/cmd/lms/Makefile (revision bce835f2166e1510cc776830775859ba3e49c1ce)
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
53$(__SUNC)CCNEEDED=	$(CCEXTNEEDED)
54LDFLAGS += $(ZIGNORE) -norunpath
55LDLIBS += -lsocket -lnsl
56
57.KEEP_STATE:
58
59all:		$(PROG)
60
61$(PROG):	$(LMSOBJS)
62		$(LINK.cc) -o $@ $(LMSOBJS) $(LDLIBS) -lc
63		$(POST_PROCESS)
64
65%.o:		%.cpp
66		$(COMPILE.cc) $(OUTPUT_OPTION) -o $@ $<
67		$(POST_PROCESS_O)
68
69install:	all $(ROOTLIBPROG) $(ROOTMANIFEST) $(ROOTMETHOD)
70
71check:		$(CHKMANIFEST)
72
73clean:
74		$(RM) $(OBJS) $(LMSOBJS)
75
76include ../Makefile.targ
77
78#
79# we're not linting lms.  it's all C++.
80#
81
82lint:
83