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 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 $@ -G $(DYNFLAGS) 54 55%.o: ../vendor/%.c 56 $(COMPILE.c) $< 57 $(POST_PROCESS_O) 58 59%.so: %.o 60 $(BUILD.SO) $< 61 $(POST_PROCESS) 62 63%.ln: ../vendor/%.c 64 $(LINT.c) $(LINTFLAGS) -c $< 65 66%.po: ../vendor/%.c 67 $(RM) messages.po 68 $(XGETTEXT) $(XGETFLAGS) \ 69 `($(GREP) -l gettext $< || echo /dev/null)` 70 $(SED) "/^domain/d" messages.po > $@ 71 $(RM) messages.po 72 73# 74# Message catalog 75# 76 77$(VERIFYPOFILE): $(POFILES) 78 $(RM) $@ 79 cat $(POFILES) > $@ 80 81install: $(ROOTLIBFWFLASHVERIFY) \ 82 $(ROOTLIBFWFLASHVERIFY)/tavor-MELLANOX.so \ 83 $(ROOTLIBFWFLASHVERIFY)/hermon-MELLANOX.so 84 85clean: 86 $(RM) $(OBJECTS) 87 88clobber: clean 89 $(RM) $(CLOBBERFILES) 90 91lint: lint_SRCS 92lint_SRCS: $(LINTFILE) 93 94_msg msg: $(VERIFYPOFILE) 95