xref: /titanic_44/usr/src/lib/scsi/libsmp/Makefile.com (revision ac88567a7a5bb7f01cf22cf366bc9d6203e24d7a)
1*ac88567aSHyon Kim#
2*ac88567aSHyon Kim# CDDL HEADER START
3*ac88567aSHyon Kim#
4*ac88567aSHyon Kim# The contents of this file are subject to the terms of the
5*ac88567aSHyon Kim# Common Development and Distribution License (the "License").
6*ac88567aSHyon Kim# You may not use this file except in compliance with the License.
7*ac88567aSHyon Kim#
8*ac88567aSHyon Kim# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*ac88567aSHyon Kim# or http://www.opensolaris.org/os/licensing.
10*ac88567aSHyon Kim# See the License for the specific language governing permissions
11*ac88567aSHyon Kim# and limitations under the License.
12*ac88567aSHyon Kim#
13*ac88567aSHyon Kim# When distributing Covered Code, include this CDDL HEADER in each
14*ac88567aSHyon Kim# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*ac88567aSHyon Kim# If applicable, add the following below this CDDL HEADER, with the
16*ac88567aSHyon Kim# fields enclosed by brackets "[]" replaced with your own identifying
17*ac88567aSHyon Kim# information: Portions Copyright [yyyy] [name of copyright owner]
18*ac88567aSHyon Kim#
19*ac88567aSHyon Kim# CDDL HEADER END
20*ac88567aSHyon Kim#
21*ac88567aSHyon Kim
22*ac88567aSHyon Kim#
23*ac88567aSHyon Kim# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24*ac88567aSHyon Kim#
25*ac88567aSHyon Kim
26*ac88567aSHyon KimLIBRARY = libsmp.a
27*ac88567aSHyon KimVERS = .1
28*ac88567aSHyon Kim
29*ac88567aSHyon KimOBJECTS = \
30*ac88567aSHyon Kim	smp_engine.o \
31*ac88567aSHyon Kim	smp_errno.o \
32*ac88567aSHyon Kim	smp_plugin.o \
33*ac88567aSHyon Kim	smp_subr.o
34*ac88567aSHyon Kim
35*ac88567aSHyon Kiminclude ../../../Makefile.lib
36*ac88567aSHyon Kiminclude ../../Makefile.defs
37*ac88567aSHyon Kim
38*ac88567aSHyon KimSRCS = $(OBJECTS:%.o=../common/%.c)
39*ac88567aSHyon KimC99MODE = $(C99_ENABLE)
40*ac88567aSHyon KimCPPFLAGS += -I../common -I. -D_REENTRANT
41*ac88567aSHyon Kim$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
42*ac88567aSHyon KimCFLAGS += $(CCVERBOSE)
43*ac88567aSHyon KimLDLIBS += \
44*ac88567aSHyon Kim	-lumem \
45*ac88567aSHyon Kim	-lc
46*ac88567aSHyon KimLIBS =		$(DYNLIB) $(LINTLIB)
47*ac88567aSHyon KimROOTLIBDIR =	$(ROOTSCSILIBDIR)
48*ac88567aSHyon KimROOTLIBDIR64 =	$(ROOTSCSILIBDIR)/$(MACH64)
49*ac88567aSHyon Kim
50*ac88567aSHyon KimCLEANFILES += \
51*ac88567aSHyon Kim	../common/smp_errno.c
52*ac88567aSHyon Kim
53*ac88567aSHyon Kim#
54*ac88567aSHyon Kim# On SPARC, gcc emits DWARF assembler directives for TLS data that are not
55*ac88567aSHyon Kim# understood by the Sun assembler.  Until this problem is fixed, we turn down
56*ac88567aSHyon Kim# the amount of generated debugging information, which seems to do the trick.
57*ac88567aSHyon Kim#
58*ac88567aSHyon Kim$(SPARC_BLD)CTF_FLAGS += -_gcc=-g1
59*ac88567aSHyon Kim
60*ac88567aSHyon Kim$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
61*ac88567aSHyon Kim
62*ac88567aSHyon Kim.KEEP_STATE:
63*ac88567aSHyon Kim
64*ac88567aSHyon Kimall : $(LIBS)
65*ac88567aSHyon Kim
66*ac88567aSHyon Kimlint : lintcheck
67*ac88567aSHyon Kim
68*ac88567aSHyon Kim../common/smp_errno.c: ../common/mkerrno.sh ../common/libsmp.h
69*ac88567aSHyon Kim	sh ../common/mkerrno.sh < ../common/libsmp.h > $@
70*ac88567aSHyon Kim
71*ac88567aSHyon Kimpics/%.o: ../common/%.c
72*ac88567aSHyon Kim	$(COMPILE.c) -o $@ $<
73*ac88567aSHyon Kim	$(POST_PROCESS_O)
74*ac88567aSHyon Kim
75*ac88567aSHyon Kiminclude ../../../Makefile.targ
76*ac88567aSHyon Kiminclude ../../Makefile.rootdirs
77