sd: remove 'ssd' driver support
[unleashed/tickless.git] / usr / src / uts / i86pc / unix / Makefile
blob9d6afbae007dccb509ab4a69c52ae368e12489c4
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
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 # This makefile drives the production of unix (and unix.o).
28 # i86pc implementation architecture dependent
32 # Path to the base of the uts directory tree (usually /usr/src/uts).
34 UTSBASE = ../..
37 # Define the module and object file sets.
39 UNIX = unix
40 DBOOT = dboot
42 OBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
43 $(CORE_OBJS:%=$(OBJS_DIR)/%) \
44 $(KRTLD_OBJS:%=$(OBJS_DIR)/%) \
45 $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%)
47 ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(UNIX)
49 UNIX_BIN = $(OBJS_DIR)/$(UNIX)
51 LIBS = $(GENLIB)
53 GENUNIX = genunix
54 GENUNIX_DIR = ../../intel/$(GENUNIX)
56 LIBOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
58 COMMP_CTF_SRC = $(OBJS_DIR)/comm_page_ctf.c
60 CTFEXTRAOBJS = $(OBJS_DIR)/vers.o $(OBJS_DIR)/comm_page_ctf.o
62 DBOOT_OBJS_DIR = dboot/$(OBJS_DIR)
63 DBOOT_OBJECTS = $(DBOOT_OBJS:%=$(DBOOT_OBJS_DIR)/%)
64 DBOOT_BIN = $(DBOOT_OBJS_DIR)/$(DBOOT)
65 DBOOT_O = $(OBJS_DIR)/$(DBOOT).o
66 DBOOT_S = $(DBOOT_O:%.o=%.s)
69 # Include common rules.
71 include $(UTSBASE)/i86pc/Makefile.i86pc
74 # Define targets
76 ALL_TARGET = $(UNIX_BIN)
77 INSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE)
80 # This is UNIX_DIR. Use a short path.
82 UNIX_DIR = .
85 # Overrides
87 CLEANFILES += \
88 $(UNIX_O) $(MODSTUBS_O) \
89 $(OBJS_DIR)/vers.c \
90 $(OBJS_DIR)/dtracestubs.s \
91 $(DTRACESTUBS_O) $(DTRACESTUBS) \
92 $(CTFEXTRAOBJS) \
93 $(COMMP_CTF_SRC)
95 CLEANFILES += \
96 $(DBOOT_O) $(DBOOT_S) \
97 $(DBOOT_OBJECTS) \
98 $(OBJS_DIR)/bios_call_src.o \
99 $(OBJS_DIR)/bios_call_src \
100 $(OBJS_DIR)/bios_call.s \
101 $(DBOOT_BIN)
103 CLEANFILES += \
104 $(DBOOT_OBJS_DIR)/$(VGATEXT_FONT).c \
105 $(OBJS_DIR)/$(VGATEXT_FONT).c
107 CLEANFILES += \
108 $(OBJS_DIR)/fb_swtch_src.o \
109 $(OBJS_DIR)/fb_swtch_src \
110 $(OBJS_DIR)/fb_swtch.s
112 CLEANFILES += \
113 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.o) \
114 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.ln)
116 CLOBBERFILES = $(CLEANFILES) $(UNIX_BIN)
118 # instr_size needs a special header
119 $(OBJS_DIR)/instr_size.o := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
120 $(OBJS_DIR)/instr_size.ln := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
122 CFLAGS += -DDIS_MEM
124 $(OBJS_DIR)/decompress.o := EXTRA_OPTIONS = -I$(SRCTOP)/kernel/zmod
127 # For now, disable these compiler warnings; maintainers should endeavor to
128 # investigate and remove these for maximum coverage. Please do not carry
129 # these forward to new Makefiles.
132 CERRWARN += -Wno-parentheses
133 CERRWARN += -Wno-uninitialized
134 CERRWARN += -Wno-char-subscripts
135 CERRWARN += -Wno-unused-variable
136 CERRWARN += -Wno-unused-function
137 CERRWARN += -Wno-unused-label
138 CERRWARN += -Wno-type-limits
139 CERRWARN += -Wno-clobbered
140 CERRWARN += -Wno-empty-body
141 CERRWARN += -Wno-unused-value
144 # Default build targets.
146 .KEEP_STATE:
148 def: $(DEF_DEPS)
150 all: $(ALL_DEPS)
152 clean: $(CLEAN_DEPS)
154 clobber: $(CLOBBER_DEPS)
156 install: $(INSTALL_DEPS)
158 $(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE) \
159 $(GENLIB) $(DTRACESTUBS) $(DBOOT_O)
160 $(LD) -dy -b -o $@ -e dboot_image -znointerp -M $(MAPFILE) \
161 $(UNIX_O) $(DBOOT_O) $(MODSTUBS_O) $(LIBOPTS) \
162 $(DTRACESTUBS)
163 $(MBH_PATCH) $(UNIX_BIN)
164 $(CTFMERGE_MODULE)
165 $(POST_PROCESS)
167 $(UNIX_O): $(OBJECTS) $(CTFEXTRAOBJS)
168 $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
170 $(DBOOT_BIN): $(DBOOT_OBJS_DIR) $(DBOOT_OBJECTS) \
171 $(SRCTOP)/arch/x86/kernel/platform/i86pc/dboot/mapfile-dboot
172 $(LD) -dn -e _start -M \
173 $(SRCTOP)/arch/x86/kernel/platform/i86pc/dboot/mapfile-dboot \
174 -o $(DBOOT_BIN) $(DBOOT_OBJECTS)
176 $(DBOOT_O): $(DBOOT_BIN)
177 @echo " .data" > $(DBOOT_S)
178 @echo " .globl dboot_image" >> $(DBOOT_S)
179 @echo "dboot_image:" >> $(DBOOT_S)
180 $(ELFEXTRACT) $(DBOOT_BIN) >> $(DBOOT_S)
181 $(COMPILE.s) -o $(DBOOT_O) $(DBOOT_S)
183 $(DBOOT_OBJS_DIR):
184 -@mkdir -p $@ 2> /dev/null
186 $(COMMP_CTF_SRC): $(UTSBASE)/i86pc/ml/comm_page.s
187 $(COMPILE.cpp) -D_GENCTF -o $@ $(UTSBASE)/i86pc/ml/comm_page.s
189 $(OBJS_DIR)/comm_page_ctf.o: $(COMMP_CTF_SRC)
190 $(COMPILE.c) -o $@ $<
191 $(CTFCONVERT_O)
194 # Special rules for generating assym.h for inclusion in assembly files.
196 $(DSF_DIR)/$(OBJS_DIR)/assym.h $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h: FRC
197 @cd $(DSF_DIR); $(MAKE) all.targ
200 # Include common targets.
202 include $(UTSBASE)/i86pc/Makefile.targ