comm: add -Wall
[unleashed.git] / usr / src / cmd / luxadm / Makefile
blob767bac9bc67ed9f93c58b9f163ebf87e105df05a
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 PROG = luxadm
28 COBJS = adm.o fchba.o lux_util.o fabric_conf.o
29 OBJS_sparc= g_adm.o diag.o fcalupdate.o hotplug.o qlgcupdate.o setboot.o
30 OBJS_i386 = x86_adm.o errormsgs.o
31 OBJS = $(OBJS_$(MACH)) $(COBJS)
33 SRCS = $(OBJS:%.o=%.c)
35 POFILES = $(OBJS:%.o=%.po)
36 POFILE = luxadm.po
38 include ../Makefile.cmd
40 CERRWARN += -Wno-parentheses
41 CERRWARN += -Wno-uninitialized
42 CERRWARN += -Wno-unused-label
43 CERRWARN += -Wno-address
45 sparc_LDLIBS = -la5k -lg_fc -ldevid -lkstat -ldevinfo
46 i386_LDLIBS =
47 LDLIBS += $($(MACH)_LDLIBS)
48 LDLIBS += -lnvpair
49 LDLIBS += -ldevice
50 LDLIBS += -lHBAAPI
52 INCS += -I$(SRC)/lib/sun_fc/common
53 INCS += -I$(SRCTOP)/include
55 CPPFLAGS += -D_LARGEFILE64_SOURCE=1 $(INCS)
58 ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
60 .KEEP_STATE:
62 all: $(PROG)
64 $(PROG): $(OBJS)
65 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
66 $(POST_PROCESS)
68 GENCAT_PROG=a5k_g_fc_i18n_cat
69 GENMSG_LUX= $(PROG).msg
70 LUXFIRMWARED= $(ROOTLIB)/locale/C/LC_MESSAGES
71 LUXIBFIRMWARE_sparc= $(LUXFIRMWARED)/ibfirmware
72 LUXIBFIRMWARE= $(LUXIBFIRMWARE_$(MACH))
73 LUXGENCAT_PROG_sparc= $(LUXFIRMWARED)/$(GENCAT_PROG)
74 LUXGENCAT_PROG= $(LUXGENCAT_PROG_$(MACH))
75 $(LUXIBFIRMWARE):= FILEMODE= 0644
76 $(LUXGENCAT_PROG):= FILEMODE= 0644
78 $(LUXFIRMWARED):
79 $(INS.dir)
81 $(LUXIBFIRMWARE): ibfirmware $(LUXFIRMWARED)
82 $(INS.file)
84 $(GENMSG_LUX): $(SRCS)
85 /usr/bin/genmsg -d -p '$(COMPILE.cpp)' -o $@ $(SRCS)
87 $(GENCAT_PROG): $(GENMSG_LUX)
88 /usr/bin/gencat $@ $(GENMSG_LUX)
90 $(LUXGENCAT_PROG): $(GENCAT_PROG) $(LUXFIRMWARED)
91 $(INS.file)
93 install: all $(ROOTUSRSBINPROG) $(LUXIBFIRMWARE) $(LUXGENCAT_PROG)
95 $(POFILE): $(POFILES)
96 $(RM) $@
97 $(CAT) $(POFILES) > $@
99 clean:
100 $(RM) $(OBJS) $(PROG) $(GENCAT_PROG) $(GENMSG_LUX)
103 include ../Makefile.targ