Merge illumos-gate
[unleashed.git] / usr / src / cmd / format / Makefile
blob44bb6d98534d445d5ee3f781e89923e805ba29c4
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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
26 # Copyright (c) 2018, Joyent, Inc.
28 PROG= format
30 COBJS= add_definition.o analyze.o checkdev.o ctlr_scsi.o \
31 defect.o init_menus.o io.o label.o main.o \
32 menu.o menu_analyze.o menu_cache.o menu_command.o menu_defect.o \
33 menu_partition.o misc.o modify_partition.o partition.o \
34 prompts.o startup.o menu_scsi.o auto_sense.o disk_generic.o \
35 menu_developer.o menu_fdisk.o
37 OBJS_sparc= init_csparc.o ctlr_ata.o
39 OBJS_i386= init_ci386.o ctlr_ata.o ix_altsctr.o
41 OBJS_= non-existent
43 OBJS= $(OBJS_$(MACH)) $(COBJS)
45 DATA= format.dat
47 include ../Makefile.cmd
49 CERRWARN += -Wno-uninitialized
50 CERRWARN += -Wno-parentheses
51 CERRWARN += -Wno-unused-label
52 CERRWARN += -Wno-clobbered
54 # not linted
55 SMATCH=off
57 SRCS= $(OBJS:.o=.c)
59 ROOTETCDATA= $(ROOTETC)/$(DATA)
61 $(ROOTETCDATA) := FILEMODE = 0644
63 LDLIBS_i386= -lfdisk
64 LDLIBS_sparc=
65 LDLIBS += -ladm -lefi -ldiskmgt -lnvpair -ldevid -ldevinfo $(LDLIBS_$(MACH))
67 CPPFLAGS += -D_EXTVTOC
69 .KEEP_STATE:
71 all: $(PROG) $(DATA)
73 .PARALLEL: $(OBJS)
75 $(PROG): $(OBJS)
76 $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
77 $(POST_PROCESS)
80 # Install format as /usr/sbin/format
82 install: $(ROOTUSRSBINPROG) $(ROOTETCDATA)
84 clean:
85 $(RM) $(OBJS)
88 sb: $(SRCS)
89 $(COMPILE.c) -xsbfast $(SRCS)
91 include ../Makefile.targ