0
|
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 |
# psm/stand/boot/sparcv9/ieee1275/sun4v/Makefile
|
|
27 |
#
|
|
28 |
#
|
|
29 |
#ident "%Z%%M% %I% %E% SMI"
|
|
30 |
#
|
|
31 |
TOPDIR = ../../../../../../..
|
|
32 |
|
|
33 |
include $(TOPDIR)/Makefile.master
|
|
34 |
include $(TOPDIR)/lib/Makefile.lib
|
|
35 |
include $(TOPDIR)/psm/stand/lib/Makefile.lib
|
|
36 |
include $(TOPDIR)/psm/Makefile.psm.64
|
|
37 |
|
|
38 |
CFLAGS64 += -xchip=ultra $(CCABS32)
|
|
39 |
|
|
40 |
PLATDIR = $(TOPDIR)/psm/promif/ieee1275/sun4u
|
|
41 |
PLATSUN4DIR = $(TOPDIR)/psm/promif/ieee1275/sun4
|
|
42 |
SYSDIR = $(TOPDIR)/uts
|
|
43 |
|
|
44 |
LIBPLAT = libplat.a
|
|
45 |
LINTLIBPLAT = llib-lplat.ln
|
|
46 |
|
|
47 |
PLAT_PFILES = \
|
|
48 |
prom_heartbeat.c \
|
|
49 |
prom_mmu.c \
|
|
50 |
prom_vercheck.c
|
|
51 |
|
|
52 |
PLAT_PSUN4FILES = \
|
|
53 |
prom_alloc.c \
|
|
54 |
prom_cpuctl.c \
|
|
55 |
prom_getunum.c \
|
|
56 |
prom_idprom.c \
|
|
57 |
prom_init.c \
|
|
58 |
prom_macaddr.c \
|
|
59 |
prom_map.c \
|
|
60 |
prom_mem.c \
|
|
61 |
prom_retain.c \
|
|
62 |
prom_sparc.c
|
|
63 |
|
|
64 |
KARCH = sun4v
|
|
65 |
MMU = sfmmu
|
|
66 |
|
|
67 |
OBJSDIR = objs
|
|
68 |
|
|
69 |
PLAT_POBJ = $(PLAT_PFILES:%.c=$(OBJSDIR)/%.o)
|
|
70 |
PLAT_PSUN4OBJ = $(PLAT_PSUN4FILES:%.c=$(OBJSDIR)/%.o)
|
|
71 |
OBJS = $(PLAT_POBJ) $(PLAT_PSUN4OBJ)
|
|
72 |
L_OBJS = $(OBJS:%.o=%.ln)
|
|
73 |
L_SRCS = $(PLAT_PFILES:%=$(PLATDIR)/%)
|
|
74 |
L_SRCS += $(PLAT_PSUN4FILES:%=$(PLATSUN4DIR)/%)
|
|
75 |
|
|
76 |
ARCHOPTS= -Dsun4v
|
|
77 |
ASFLAGS = -P -D__STDC__ -D_BOOT -D_ASM
|
|
78 |
CPPDEFS = $(ARCHOPTS) -D$(KARCH) -D_BOOT -D_KERNEL -D_MACHDEP
|
|
79 |
CPPINCS = -I. -I$(SYSDIR)/sun4 -I$(SYSDIR)/$(KARCH) -I$(SYSDIR)/$(MMU) \
|
|
80 |
-I$(SYSDIR)/sun4u \
|
|
81 |
-I$(SYSDIR)/sparc/v9 -I$(SYSDIR)/sparc \
|
|
82 |
-I$(SYSDIR)/sun -I$(SYSDIR)/common
|
|
83 |
CPPFLAGS= $(CPPDEFS) $(CPPINCS) $(CPPFLAGS.master)
|
|
84 |
CFLAGS += $(CCVERBOSE)
|
|
85 |
|
|
86 |
.KEEP_STATE:
|
|
87 |
|
|
88 |
.PARALLEL: $(OBJS) $(L_OBJS)
|
|
89 |
|
|
90 |
all install: $(LIBPLAT)
|
|
91 |
|
|
92 |
lint: $(LINTLIBPLAT)
|
|
93 |
|
|
94 |
clean:
|
|
95 |
$(RM) $(OBJS) $(L_OBJS)
|
|
96 |
|
|
97 |
clobber: clean
|
|
98 |
$(RM) $(LIBPLAT) $(LINTLIBPLAT) a.out core
|
|
99 |
|
|
100 |
$(LIBPLAT): $(OBJSDIR) .WAIT $(OBJS)
|
|
101 |
$(BUILD.AR) $(OBJS)
|
|
102 |
|
|
103 |
$(LINTLIBPLAT): $(OBJSDIR) .WAIT $(L_OBJS)
|
|
104 |
@$(ECHO) "\nlint library construction:" $@
|
|
105 |
@$(LINT.lib) -o plat $(L_SRCS)
|
|
106 |
|
|
107 |
$(OBJSDIR):
|
|
108 |
-@[ -d $@ ] || mkdir $@
|
|
109 |
|
|
110 |
#
|
|
111 |
# build rules using standard library object subdirectory
|
|
112 |
#
|
|
113 |
$(OBJSDIR)/%.o: $(PLATDIR)/%.c
|
|
114 |
$(COMPILE.c) -o $@ $<
|
|
115 |
$(POST_PROCESS_O)
|
|
116 |
|
|
117 |
$(OBJSDIR)/%.o: $(PLATDIR)/%.s
|
|
118 |
$(COMPILE.s) -o $@ $<
|
|
119 |
$(POST_PROCESS_O)
|
|
120 |
|
|
121 |
$(OBJSDIR)/%.o: $(PLATSUN4DIR)/%.c
|
|
122 |
$(COMPILE.c) -o $@ $<
|
|
123 |
$(POST_PROCESS_O)
|
|
124 |
|
|
125 |
$(OBJSDIR)/%.o: $(PLATSUN4DIR)/%.s
|
|
126 |
$(COMPILE.s) -o $@ $<
|
|
127 |
$(POST_PROCESS_O)
|
|
128 |
|
|
129 |
$(OBJSDIR)/%.ln: $(PLATDIR)/%.c
|
|
130 |
@($(LHEAD) $(LINT.c) $< $(LTAIL))
|
|
131 |
@$(MV) $(@F) $@
|
|
132 |
|
|
133 |
$(OBJSDIR)/%.ln: $(PLATDIR)/%.s
|
|
134 |
@($(LHEAD) $(LINT.s) $< $(LTAIL))
|
|
135 |
@$(MV) $(@F) $@
|
|
136 |
|
|
137 |
$(OBJSDIR)/%.ln: $(PLATSUN4DIR)/%.c
|
|
138 |
@($(LHEAD) $(LINT.c) $< $(LTAIL))
|
|
139 |
@$(MV) $(@F) $@
|
|
140 |
|
|
141 |
$(OBJSDIR)/%.ln: $(PLATSUN4DIR)/%.s
|
|
142 |
@($(LHEAD) $(LINT.s) $< $(LTAIL))
|
|
143 |
@$(MV) $(@F) $@
|