xref: /illumos-gate/usr/src/cmd/scadm/Makefile.com (revision 8b80e8cb6855118d46f605e91b5ed4ce83417395)
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
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/scadm/Makefile.com
29#
30
31#
32#	Create default so empty rules don't
33#	confuse make
34#
35CLASS		= 32
36
37include $(SRC)/cmd/Makefile.cmd
38include $(SRC)/Makefile.psm
39
40PROG		= scadm
41
42FILEMODE	= 2755
43DIRMODE		= 755
44OWNER		= root
45GROUP		= sys
46
47#IMPL = $(PLATFORM:sun%=sun)
48IMPL = mpxu
49
50mpxu_OBJS = boot_recv.o callback.o date.o download.o eventlog.o \
51	help.o init.o modem_setup.o process_command.o reset.o \
52	scadm.o send_event.o send_file.o set.o show.o status.o usage.o \
53	user.o valid_srecord.o wrappers.o smq.o xsem.o consolelog.o \
54	configlog.o
55
56OBJS= $($(IMPL)_OBJS)
57
58mpxu_SOURCES = boot_recv.c callback.c date.c download.c eventlog.c \
59	help.c init.c modem_setup.c process_command.c reset.c \
60	scadm.c send_event.c send_file.c set.c show.c status.c usage.c \
61	user.c valid_srecord.c wrappers.c smq.c xsem.c consolelog.c \
62	configlog.c
63
64SOURCES= $($(IMPL)_SOURCES)
65
66# allow additional kernel-architecture dependent objects to be specified.
67
68OBJS		+= $(KARCHOBJS)
69
70SRCS		= $(OBJS:%.o=%.c)
71
72LINT_OBJS	= $(OBJS:%.o=%.ln)
73
74POFILE		= scadm_$(PLATFORM).po
75POFILES		= $(OBJS:%.o=%.po)
76
77
78# These names describe the layout on the target machine
79
80IFLAGS = -I$(SRCDIR) -I$(USR_PSM_INCL_DIR) \
81	-I$(SRCDIR)/../../lib/librsc/sparc/mpxu/common \
82	-I$(SRCDIR)/../../uts/sun4u -I$(SRCDIR)/../../../src/uts/sun4u
83
84CPPFLAGS = $(IFLAGS) $(CPPFLAGS.master) -D_SYSCALL32
85
86LINKED_DIRS     = $(PLATLINKS:%=$(USR_PLAT_DIR)/%)
87LINKED_SBIN_DIRS = $(PLATLINKS:%=$(USR_PLAT_DIR)/%/sbin)
88
89.PARALLEL: $(OBJS)
90
91$(LINKED_SBIN_DIRS): $(LINKED_DIRS)
92	-$(INS.dir.root.sys)
93
94%.o:	common/%.c
95	$(COMPILE.c) -o $@ $<
96
97%.o:	$(SRCDIR)/common/%.c
98	$(COMPILE.c) -o $@ $<
99
100%.ln:	common/%.c
101	$(LINT.c) -c $@ $<
102
103%.ln:	$(SRCDIR)/common/%.c
104	$(LINT.c) -c $@ $<
105
106%.po:   common/%.c
107	$(COMPILE.cpp) $<  > $<.i
108	$(BUILD.po)
109
110%.po:   $(SRCDIR)/common/%.c
111	$(COMPILE.cpp) $<  > $<.i
112	$(BUILD.po)
113