Unleashed v1.4
[unleashed.git] / usr / src / cmd / luxadm / Makefile
blobaf3d72b8f7459e430d97239123540d7a472c002d
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.
25 # Copyright (c) 2018, Joyent, Inc.
27 PROG = luxadm
29 COBJS = adm.o fchba.o lux_util.o fabric_conf.o
30 OBJS_sparc= g_adm.o diag.o fcalupdate.o hotplug.o qlgcupdate.o setboot.o
31 OBJS_i386 = x86_adm.o errormsgs.o
32 OBJS = $(OBJS_$(MACH)) $(COBJS)
34 SRCS = $(OBJS:%.o=%.c)
36 POFILES = $(OBJS:%.o=%.po)
37 POFILE = luxadm.po
39 include ../Makefile.cmd
41 CERRWARN += -Wno-parentheses
42 CERRWARN += -Wno-uninitialized
43 CERRWARN += -Wno-unused-label
44 CERRWARN += -Wno-address
46 # not linted
47 SMATCH=off
49 sparc_LDLIBS = -la5k -lg_fc -ldevid -lkstat -ldevinfo
50 i386_LDLIBS =
51 LDLIBS += $($(MACH)_LDLIBS)
52 LDLIBS += -lnvpair
53 LDLIBS += -ldevice
54 LDLIBS += -lHBAAPI
56 INCS += -I$(SRC)/lib/sun_fc/common
57 INCS += -I$(SRCTOP)/include
59 CPPFLAGS += $(INCS)
62 ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
64 .KEEP_STATE:
66 all: $(PROG)
68 $(PROG): $(OBJS)
69 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
70 $(POST_PROCESS)
72 GENCAT_PROG=a5k_g_fc_i18n_cat
73 GENMSG_LUX= $(PROG).msg
74 LUXFIRMWARED= $(ROOTLIB)/locale/C/LC_MESSAGES
75 LUXIBFIRMWARE_sparc= $(LUXFIRMWARED)/ibfirmware
76 LUXIBFIRMWARE= $(LUXIBFIRMWARE_$(MACH))
77 LUXGENCAT_PROG_sparc= $(LUXFIRMWARED)/$(GENCAT_PROG)
78 LUXGENCAT_PROG= $(LUXGENCAT_PROG_$(MACH))
79 $(LUXIBFIRMWARE):= FILEMODE= 0644
80 $(LUXGENCAT_PROG):= FILEMODE= 0644
82 $(LUXFIRMWARED):
83 $(INS.dir)
85 $(LUXIBFIRMWARE): ibfirmware $(LUXFIRMWARED)
86 $(INS.file)
88 $(GENMSG_LUX): $(SRCS)
89 /usr/bin/genmsg -d -p '$(COMPILE.cpp)' -o $@ $(SRCS)
91 $(GENCAT_PROG): $(GENMSG_LUX)
92 /usr/bin/gencat $@ $(GENMSG_LUX)
94 $(LUXGENCAT_PROG): $(GENCAT_PROG) $(LUXFIRMWARED)
95 $(INS.file)
97 install: all $(ROOTUSRSBINPROG) $(LUXIBFIRMWARE) $(LUXGENCAT_PROG)
99 $(POFILE): $(POFILES)
100 $(RM) $@
101 $(CAT) $(POFILES) > $@
103 clean:
104 $(RM) $(OBJS) $(PROG) $(GENCAT_PROG) $(GENMSG_LUX)
107 include ../Makefile.targ