xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile (revision 581cede61ac9c14d8d4ea452562a567189eead78)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29LIBRARY=	libpsvcobj.a
30VERS=		.1
31
32OBJECTS=	psvcobj.o
33
34# include library definitions
35include $(SRC)/lib/Makefile.lib
36include $(SRC)/Makefile.psm
37
38include $(SRC)/cmd/picl/plugins/Makefile.com
39
40SRCS=		$(OBJECTS:%.o=%.c)
41
42LIBS =		$(DYNLIB)
43
44PLATFORM = sun4u
45
46USR_PLAT_PSVCOBJ = $(LIBS:%=$(USR_PSM_LIB_DIR)/%)
47
48CLEANFILES=	$(LINTOUT) $(LINTLIB)
49
50CPPFLAGS +=	-I$(SRC)/uts/sun4u -I.
51
52CFLAGS +=	$(CCVERBOSE)
53LDLIBS +=	-L$(SRC)/lib/libdevfsevent
54LDLIBS +=	-lc
55
56LINTFLAGS +=
57
58# definitions for install_h target
59HDRS=		psvc_objects.h
60PLATHDRS=	$(HDRS:%=$(USR_PSM_INCL_DIR)/%)
61CHECKHDRS=	$(HDRS:%.h=%.check)
62
63.KEEP_STATE:
64
65SUBDIRS=
66
67POFILE=	psvcobj.po
68
69all :=		TARGET= all
70install :=	TARGET= install
71clean :=	TARGET= clean
72clobber :=	TARGET= clobber
73lint :=		TARGET= lint
74_msg :=		TARGET= _msg
75
76all: $(LIBS) $(LIBLINKS)
77
78install:	all $(USR_PSM_LIB_DIR) $(USR_PLAT_PSVCOBJ)
79
80install_h:	$(USR_PSM_INCL_DIR) $(PLATHDRS)
81
82$(LIBLINKS):	FRC
83	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
84
85_msg:	$(POFILE)
86
87# include library targets
88include $(SRC)/cmd/picl/plugins/Makefile.targ
89include $(SRC)/lib/Makefile.targ
90
91$(USR_PSM_LIB_DIR):	FRC
92	$(INS.dir)
93
94$(USR_PSM_INCL_DIR)/%: %
95	$(INS.file)
96
97$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
98	$(INS.file) ;\
99	$(RM) -r $(USR_PSM_LIB_DIR)/libpsvcobj.so; \
100	$(SYMLINK) ./libpsvcobj.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcobj.so
101
102lint :
103	$(LINT.c) $(SRCS)
104
105$(SUBDIRS): FRC
106	@cd $@; pwd; $(MAKE) $(TARGET)
107
108FRC:
109