xref: /illumos-gate/usr/src/cmd/fwflash/plugins/transport/i386/Makefile (revision b9175c69691c8949bec97fb8f689b7d1efdb05bb)
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/i386
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
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
60$(ROOTLIBFWFLASHPLUGINS)/$(SLINKS) : $(ROOTLIBFWFLASHPLUGINS)/ses.so
61	@$(RM) $@
62	$(SYMLINK) $(PLUGINS) $@
63
64
65
66install: $(ROOTLIBFWFLASHPLUGINS) \
67	$(ROOTLIBFWFLASHPLUGINS)/ses.so \
68	$(ROOTLIBFWFLASHPLUGINS)/$(SLINKS)
69
70clobber clean:
71	$(RM) $(CLEANFILES) $(CLOBBERFILES)
72
73lint:	lint_SRCS
74
75%.o: ../common/%.c
76	$(COMPILE.c) $<
77	$(POST_PROCESS_O)
78
79%.so: %.o
80	$(BUILD.SO) $<
81
82
83#
84# Message catalog
85#
86$(POFILES): ../common/$(SRCS)
87	$(RM) messages.po
88	$(XGETTEXT) $(XGETFLAGS) \
89	    `($(GREP) -l gettext ../common/ses.c || echo /dev/null)`
90	$(SED) "/^domain/d" messages.po > $@
91	$(RM) messages.po
92
93$(IDENTPOFILE): $(POFILES)
94	$(RM) $@
95	cat $(POFILES) > $@
96
97lint_SRCS: ../common/$(SRCS:%.c=%.ln)
98
99msg:	$(IDENTPOFILE)
100