xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile (revision 8e458de0baeb1fee50643403223bc7e909a48464)
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
50CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
51CPPFLAGS +=	-D_POSIX_PTHREAD_SEMANTICS
52CPPFLAGS +=	-D_REENTRANT
53
54# Components of load time linker path.
55# These paths start at / on the target machine, so don't use $(ROOT).
56# However, to silence makestyle use empty string $(RUNTIMEROOT)
57RUNTIMEROOT =
58PICLPLATDYN =	$(RUNTIMEROOT)/usr/platform/\$$PLATFORM/lib/picl/plugins
59PICLARCHDYN =	$(RUNTIMEROOT)/usr/platform/sun4u/lib/picl/plugins
60PICLGENDYN =	$(RUNTIMEROOT)/usr/lib/picl/plugins
61
62DYNFLAGS +=	-R$(PICLPLATDYN):$(PICLARCHDYN):$(PICLGENDYN)
63LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
64LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
65LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/piclevent
66LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/frutree
67LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/memcfg
68LDLIBS +=	-lpicltree -ldevinfo -lc
69
70.KEEP_STATE:
71
72SUBDIRS=
73
74all :=		TARGET= all
75install :=	TARGET= install
76clean :=	TARGET= clean
77clobber :=	TARGET= clobber
78_msg :=		TARGET= _msg
79
80POFILE =	piclfcal_leds_lw2plus.po
81POFILES =	$(SRCS:%.c=%.po)
82
83all:		$(LIBS) $(LIBLINKS)
84
85install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
86
87$(POFILE):	$(POFILES)
88	$(CAT) $(POFILES) > $(POFILE)
89
90_msg:	$(MSGDOMAIN) $(POFILE)
91	$(RM) $(MSGDOMAIN)/$(POFILE)
92	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
93
94$(MSGDOMAIN):
95	$(INS.dir)
96
97
98$(LIBLINKS):	FRC
99	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
100
101# include library targets
102include $(SRC)/lib/Makefile.targ
103include	$(SRC)/cmd/picl/plugins/Makefile.targ
104
105lint:
106
107$(SUBDIRS): FRC
108	@cd $@; pwd; $(MAKE) $(TARGET)
109
110FRC:
111