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