xref: /illumos-gate/usr/src/cmd/fwflash/plugins/transport/sparc/Makefile (revision 9db67a327daf1243e630c20b81978ffd2a7baad7)
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
37SLINKS=		sgen.so
38
39CLEANFILES=	$(OBJECTS)
40CLOBBERFILES=	$(PLUGINS) $(POFILES) $(IDENTPOFILE) $(LINTFILE) $(SLINKS)
41
42
43
44all:		$(PLUGINS)
45_msg msg:	$(IDENTPOFILE)
46
47
48include $(SRC)/Makefile.master
49include $(SRC)/cmd/fwflash/Makefile.com
50
51CFLAGS  += -g -D_POSIX_PTHREAD_SEMANTICS
52DYNFLAGS += -Bdynamic
53LDLIBS	+= -L$(ROOT)/usr/lib/scsi -ldevinfo -lumem -lc -lscsi -lses
54LDFLAGS += -R/usr/lib/scsi
55
56BUILD.SO=	$(LD) -o $@ -G $(DYNFLAGS) $(LDFLAGS) $(LDLIBS)
57
58$(PLUGINS) :=	FILEMODE = 0555
59
60
61$(ROOTLIBFWFLASHPLUGINS)/$(SLINKS) : $(ROOTLIBFWFLASHPLUGINS)/ses.so
62	@$(RM) $@
63	$(SYMLINK) $(PLUGINS) $@
64
65install: $(ROOTLIBFWFLASHPLUGINS) \
66	$(ROOTLIBFWFLASHPLUGINS)/ses.so \
67	$(ROOTLIBFWFLASHPLUGINS)/$(SLINKS)
68
69clobber clean:
70	$(RM) $(CLEANFILES) $(CLOBBERFILES)
71
72lint:	lint_SRCS
73
74%.o: ../common/%.c
75	$(COMPILE.c) $<
76	$(POST_PROCESS_O)
77
78%.so: %.o
79	$(BUILD.SO) $<
80
81
82#
83# Message catalog
84#
85$(POFILES): ../common/$(SRCS)
86	$(RM) messages.po
87	$(XGETTEXT) $(XGETFLAGS) \
88	    `($(GREP) -l gettext ../common/ses.c || echo /dev/null)`
89	$(SED) "/^domain/d" messages.po > $@
90	$(RM) messages.po
91
92$(IDENTPOFILE): $(POFILES)
93	$(RM) $@
94	cat $(POFILES) > $@
95
96lint_SRCS: ../common/$(SRCS:%.c=%.ln)
97
98msg:	$(IDENTPOFILE)
99