xref: /titanic_44/usr/src/lib/libdisasm/Makefile.targ (revision f7184619589931c4b827180c213074c470f08a8f)
1dc0093f4Seschrock#
2dc0093f4Seschrock# CDDL HEADER START
3dc0093f4Seschrock#
4dc0093f4Seschrock# The contents of this file are subject to the terms of the
5dc0093f4Seschrock# Common Development and Distribution License (the "License").
6dc0093f4Seschrock# You may not use this file except in compliance with the License.
7dc0093f4Seschrock#
8dc0093f4Seschrock# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9dc0093f4Seschrock# or http://www.opensolaris.org/os/licensing.
10dc0093f4Seschrock# See the License for the specific language governing permissions
11dc0093f4Seschrock# and limitations under the License.
12dc0093f4Seschrock#
13dc0093f4Seschrock# When distributing Covered Code, include this CDDL HEADER in each
14dc0093f4Seschrock# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15dc0093f4Seschrock# If applicable, add the following below this CDDL HEADER, with the
16dc0093f4Seschrock# fields enclosed by brackets "[]" replaced with your own identifying
17dc0093f4Seschrock# information: Portions Copyright [yyyy] [name of copyright owner]
18dc0093f4Seschrock#
19dc0093f4Seschrock# CDDL HEADER END
20dc0093f4Seschrock#
21dc0093f4Seschrock#
22*24da5b34Srie# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23dc0093f4Seschrock# Use is subject to license terms.
24dc0093f4Seschrock#
25f808c858Sraf
26f808c858Sraf#
27dc0093f4Seschrock# We build each flavor in a separate make invocation to improve clarity(!) in
28dc0093f4Seschrock# Makefile.com.  The subordinate makes have $(CURTYPE) set to indicate the
29dc0093f4Seschrock# flavor they're supposed to build.  This causes the correct set of source
30dc0093f4Seschrock# files and compiler and linker flags to be selected.
31dc0093f4Seschrock#
32dc0093f4Seschrock
33dc0093f4Seschrockinstall: $(TYPES:%=install.%)
34dc0093f4Seschrock
35dc0093f4Seschrockall: $(TYPES:%=all.%)
36dc0093f4Seschrock
37dc0093f4Seschrock$(TYPES:%=all.%):
38dc0093f4Seschrock	@CURTYPE=$(@:all.%=%) $(MAKE) $@.targ
39dc0093f4Seschrock
40dc0093f4Seschrock$(TYPES:%=install.%):
41dc0093f4Seschrock	@CURTYPE=$(@:install.%=%) $(MAKE) $@.targ
42dc0093f4Seschrock
43dc0093f4Seschrockinstall.library.targ: all.library $(INSTALL_DEPS_library)
44dc0093f4Seschrockinstall.standalone.targ: all.standalone $(INSTALL_DEPS_standalone)
45dc0093f4Seschrock
46dc0093f4Seschrockall.library.targ: $(LIBS)
47dc0093f4Seschrockall.standalone.targ: $(STANDLIBRARY)
48dc0093f4Seschrock
49dc0093f4Seschrocklint: $(TYPES:%=lint.%)
50dc0093f4Seschrock
51dc0093f4Seschrock$(TYPES:%=lint.%):
52dc0093f4Seschrock	@CURTYPE=$(@:lint.%=%) $(MAKE) lintcheck
53dc0093f4Seschrock
54dc0093f4Seschrock$(STANDLIBRARY): $(OBJS) $(LINKTEST_OBJ)
55*24da5b34Srie	$(LD) $(BREDUCE) $(ZDEFS) $(LDFLAGS) -o $@.linktest $(OBJS) $(LINKTEST_OBJ)
56dc0093f4Seschrock	rm $@.linktest
57dc0093f4Seschrock	$(LD) $(LDFLAGS) -o $@ $(OBJS)
58dc0093f4Seschrock
59dc0093f4Seschrockclobber: $(TYPES:%=clobber.%)
60dc0093f4Seschrock
61dc0093f4Seschrock$(TYPES:%=clobber.%):
62dc0093f4Seschrock	@CURTYPE=$(@:clobber.%=%) $(MAKE) clobber.targ
63dc0093f4Seschrock
64dc0093f4Seschrockclobber.targ: clean
65dc0093f4Seschrock	-$(RM) $(CLOBBERTARGFILES)
66dc0093f4Seschrock
67dc0093f4Seschrock# include library targets
68dc0093f4Seschrockinclude $(SRC)/lib/Makefile.targ
69dc0093f4Seschrock
70dc0093f4Seschrock$(PICS): pics
71dc0093f4Seschrock$(OBJS): objs
72dc0093f4Seschrock
73dc0093f4Seschrockobjs/%.o pics/%.o: $(ISASRCDIR)/%.c
74dc0093f4Seschrock	$(COMPILE.c) -o $@ $<
75dc0093f4Seschrock	$(POST_PROCESS_O)
76dc0093f4Seschrock
77dc0093f4Seschrockobjs/%.o pics/%.o: $(ISASRCDIR)/%.s
78dc0093f4Seschrock	$(COMPILE.s) -o $@ $<
79dc0093f4Seschrock	$(POST_PROCESS_O)
80dc0093f4Seschrock
81dc0093f4Seschrockobjs/%.o pics/%.o: $(COMDIR)/%.c
82dc0093f4Seschrock	$(COMPILE.c) -o $@ $<
83dc0093f4Seschrock	$(POST_PROCESS_O)
84dc0093f4Seschrock
85dc0093f4Seschrock# install rule for lint library target
86dc0093f4Seschrock$(ROOTLINTDIR)/%: $(COMDIR)/%
87dc0093f4Seschrock	$(INS.file)
88dc0093f4Seschrock
89dc0093f4Seschrock# install rule for x86 common source
90dc0093f4Seschrockobjs/%.o pics/%.o: $(SRC)/common/dis/i386/%.c
91dc0093f4Seschrock	$(COMPILE.c) -o $@ $<
92dc0093f4Seschrock	$(POST_PROCESS_O)
93