xref: /illumos-gate/usr/src/cmd/format/Makefile (revision e8031f0a8ed0e45c6d8847c5e09424e66fd34a4b)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29PROG= format
30
31COBJS=	add_definition.o analyze.o checkdev.o ctlr_scsi.o \
32	defect.o init_menus.o io.o label.o main.o \
33	menu.o menu_analyze.o menu_cache.o menu_command.o menu_defect.o \
34	menu_partition.o misc.o modify_partition.o partition.o \
35	prompts.o startup.o menu_scsi.o auto_sense.o disk_generic.o \
36	menu_developer.o menu_fdisk.o
37
38OBJS_sparc=   init_csparc.o ctlr_ata.o
39
40OBJS_i386=    init_ci386.o ctlr_ata.o ix_altsctr.o
41
42OBJS_=                non-existent
43
44OBJS=  $(OBJS_$(MACH))  $(COBJS)
45
46DATA= format.dat
47
48include ../Makefile.cmd
49
50SRCS= $(OBJS:.o=.c)
51
52ROOTSYMLINK= $(ROOTETCPROG)
53ROOTETCDATA= $(ROOTETC)/$(DATA)
54
55$(ROOTETCDATA) := FILEMODE = 0644
56$(ROOTETCDATA) := OWNER = root
57$(ROOTETCDATA) := GROUP = sys
58
59LDLIBS +=	-ladm -lefi -ldiskmgt -lnvpair -ldevid
60
61.KEEP_STATE:
62
63all: $(PROG) $(DATA)
64
65.PARALLEL: $(OBJS)
66
67$(PROG): $(OBJS)
68	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
69	$(POST_PROCESS)
70
71#
72# Install format as /usr/sbin/format, with link from /etc/format
73#
74install: $(ROOTUSRSBINPROG) $(ROOTSYMLINK) $(ROOTETCDATA)
75
76$(ROOTSYMLINK):
77	$(RM) $@; $(SYMLINK) ../usr/sbin/$(PROG) $@
78
79clean:
80	$(RM) $(OBJS)
81
82lint: lint_SRCS
83
84sb: $(SRCS)
85	$(COMPILE.c) -xsbfast $(SRCS)
86
87include ../Makefile.targ
88