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