xref: /titanic_52/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
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
26include	$(SRC)/Makefile.psm
27
28LIBRARY=	libfcal_leds.a
29VERS=		.1
30
31OBJECTS=	fcal_leds.o fc_led_parse.o fcal_leds_thread.o
32
33# include library definitions
34include $(SRC)/lib/Makefile.lib
35
36ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T4
37
38include	$(SRC)/cmd/picl/plugins/Makefile.com
39
40SRCS=		$(OBJECTS:%.o=%.c)
41
42LIBS =		$(DYNLIB)
43
44ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
45
46CONF=		fcal_leds.conf
47ROOTCONF=	$(CONF:%=$(ROOTLIBDIR)/%)
48$(ROOTCONF)	:= FILEMODE = 0644
49
50LINTSRC =	$(LINTLIB:%.ln=%)
51ROOTLINTDIR =	$(ROOTLIBDIR)
52ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
53
54CLEANFILES=	$(LINTOUT) $(LINTLIB)
55
56CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
57CPPFLAGS +=	-D_POSIX_PTHREAD_SEMANTICS
58CPPFLAGS +=	-D_REENTRANT
59
60# Components of load time linker path.
61# These paths start at / on the target machine, so don't use $(ROOT).
62# However, to silence makestyle use empty string $(RUNTIMEROOT)
63RUNTIMEROOT =
64PICLPLATDYN =	$(RUNTIMEROOT)/usr/platform/\$$PLATFORM/lib/picl/plugins
65PICLARCHDYN =	$(RUNTIMEROOT)/usr/platform/sun4u/lib/picl/plugins
66PICLGENDYN =	$(RUNTIMEROOT)/usr/lib/picl/plugins
67
68DYNFLAGS +=	-R$(PICLPLATDYN):$(PICLARCHDYN):$(PICLGENDYN)
69LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
70LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
71LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/piclevent
72LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/frutree
73LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/memcfg
74LDLIBS +=	-lpicltree -lpicldevtree -lpiclfrutree -lnvpair
75LDLIBS +=	-ldevinfo -lc
76
77.KEEP_STATE:
78
79SUBDIRS=
80
81all :=		TARGET= all
82install :=	TARGET= install
83clean :=	TARGET= clean
84clobber :=	TARGET= clobber
85lint :=		TARGET= lint
86_msg :=		TARGET= _msg
87
88POFILE =	piclfcal_leds_lw2plus.po
89POFILES =	$(SRCS:%.c=%.po)
90
91all:		$(LIBS) $(LIBLINKS)
92
93install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
94
95$(POFILE):	$(POFILES)
96	$(CAT) $(POFILES) > $(POFILE)
97
98_msg:	$(MSGDOMAIN) $(POFILE)
99	$(RM) $(MSGDOMAIN)/$(POFILE)
100	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
101
102$(MSGDOMAIN):
103	$(INS.dir)
104
105
106$(LIBLINKS):	FRC
107	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
108
109# include library targets
110include $(SRC)/lib/Makefile.targ
111include	$(SRC)/cmd/picl/plugins/Makefile.targ
112
113$(ROOTLINTDIR)/%: ../%
114	$(INS.file)
115
116lint:
117	$(LINT.c) $(SRCS)
118
119$(SUBDIRS): FRC
120	@cd $@; pwd; $(MAKE) $(TARGET)
121
122FRC:
123