xref: /illumos-gate/usr/src/cmd/fwflash/plugins/sparc/Makefile (revision 129b3e6c5b0ac55b5021a4c38db6387b6acdaaf1)
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 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# cmd/fwflash/plugins/sparc
25#
26
27SRCS=		tavor-MELLANOX.c hermon-MELLANOX.c sd-GENERIC.c
28OBJECTS=	$(SRCS:%.c=%.o)
29PLUGINS=	$(SRCS:%.c=%.so)
30POFILES=	$(SRCS:%.c=%.po)
31LINTFILE=	$(SRCS:%.c=%.ln)
32
33VERIFYPOFILE=	fwflash_verify_msg.po
34
35CLOBBERFILES=	$(PLUGINS) $(OBJECTS) $(LINTFILE) \
36		$(POFILES) $(VERIFYPOFILE)
37TEXT_DOMAIN= SUNW_OST_OSCMD
38
39all:		$(PLUGINS)
40
41
42include $(SRC)/Makefile.master
43include $(SRC)/cmd/fwflash/Makefile.com
44
45
46CFLAGS  += -g -D_POSIX_PTHREAD_SEMANTICS -I$(ROOT)/usr/include
47MANUFACTURING_MODE=0
48CFLAGS += -DMANUFACTURING_MODE=$(MANUFACTURING_MODE)
49LDLIBS	+= -ldevinfo -lumem -lc
50DYNFLAGS += -Bdynamic
51LIBS=   $(DYNLIB)
52
53BUILD.SO=	$(LD) -o $@ $(HERMON_LDFLAGS) -G $(DYNFLAGS)
54
55hermon-MELLANOX.so := HERMON_LDFLAGS += -N/usr/lib/fwflash/identify/hermon.so
56
57%.o: ../vendor/%.c
58	$(COMPILE.c) $<
59	$(POST_PROCESS_O)
60
61%.so: %.o
62	$(BUILD.SO) $<
63	$(POST_PROCESS)
64
65%.ln: ../vendor/%.c
66	$(LINT.c) $(LINTFLAGS) -c $<
67
68%.po: ../vendor/%.c
69	$(RM) messages.po
70	$(XGETTEXT) $(XGETFLAGS) \
71	    `($(GREP) -l gettext $< || echo /dev/null)`
72	$(SED) "/^domain/d" messages.po > $@
73	$(RM) messages.po
74
75#
76# Message catalog
77#
78
79$(VERIFYPOFILE):	$(POFILES)
80	$(RM) $@
81	cat $(POFILES) > $@
82
83install: $(ROOTLIBFWFLASHVERIFY) \
84	$(ROOTLIBFWFLASHVERIFY)/tavor-MELLANOX.so \
85	$(ROOTLIBFWFLASHVERIFY)/hermon-MELLANOX.so \
86	$(ROOTLIBFWFLASHVERIFY)/sd-GENERIC.so
87
88clean:
89	$(RM) $(OBJECTS)
90
91clobber: clean
92	$(RM) $(CLOBBERFILES)
93
94lint:		lint_SRCS
95lint_SRCS:	$(LINTFILE)
96
97_msg msg:	$(VERIFYPOFILE)
98