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# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24#ident	"%Z%%M%	%I%	%E% SMI"
25#
26#
27# cmd/fwflash/plugins/transport/sparc
28#
29
30SRCS=		ses.c
31
32OBJECTS= 	$(SRCS:%.c=%.o)
33PLUGINS= 	$(SRCS:%.c=%.so)
34POFILES=	ses.po
35IDENTPOFILE= 	fwflash_transport_identify_ses.po
36LINTFILE=	ses.ln
37
38CLEANFILES=	$(OBJECTS)
39CLOBBERFILES=	$(PLUGINS) $(POFILES) $(IDENTPOFILE) $(LINTFILE)
40
41
42
43all:		$(PLUGINS)
44_msg msg:	$(IDENTPOFILE)
45
46
47include $(SRC)/Makefile.master
48include $(SRC)/cmd/fwflash/Makefile.com
49
50CFLAGS  += -g -D_POSIX_PTHREAD_SEMANTICS
51DYNFLAGS += -Bdynamic
52LDLIBS	+= -L$(ROOT)/usr/lib/scsi -ldevinfo -lumem -lc -lscsi -lses
53LDFLAGS += -R/usr/lib/scsi
54
55BUILD.SO=	$(LD) -o $@ -G $(DYNFLAGS) $(LDFLAGS) $(LDLIBS)
56
57$(PLUGINS) :=	FILEMODE = 0555
58
59
60install: $(ROOTLIBFWFLASHPLUGINS) \
61	$(ROOTLIBFWFLASHPLUGINS)/ses.so
62
63clobber clean:
64	$(RM) $(CLEANFILES) $(CLOBBERFILES)
65
66lint:	lint_SRCS
67
68%.o: ../common/%.c
69	$(COMPILE.c) $<
70	$(POST_PROCESS_O)
71
72%.so: %.o
73	$(BUILD.SO) $<
74
75
76#
77# Message catalog
78#
79$(POFILES): ../common/$(SRCS)
80	$(RM) messages.po
81	$(XGETTEXT) $(XGETFLAGS) \
82	    `($(GREP) -l gettext ../common/ses.c || echo /dev/null)`
83	$(SED) "/^domain/d" messages.po > $@
84	$(RM) messages.po
85
86$(IDENTPOFILE): $(POFILES)
87	$(RM) $@
88	cat $(POFILES) > $@
89
90lint_SRCS: ../common/$(SRCS:%.c=%.ln)
91
92msg:	$(IDENTPOFILE)
93