xref: /onnv-gate/usr/src/cmd/fps/Makefile (revision 13093:48f2dbca79a2)
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# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25include ../Makefile.cmd
26
27.KEEP_STATE:
28
29all := TARGET = all
30clean := TARGET = clean
31clobber := TARGET = clobber
32install := TARGET = install
33lint := TARGET = lint
34_msg := TARGET = _msg
35check := TARGET = check
36
37SUBDIRS = fpsd compilercheck fptest
38
39all clean clobber install lint _msg: $(SUBDIRS)
40
41check: fpsd
42
43#
44# The compilation of fptest is forced to be done with the Sun
45# Studio compiler.  This is because fptest is dependent on some Sun
46# performance libraries provided as part of the Sun Studio compiler
47# installation.  fptest statically links libsunperf.a, libfui.a,
48# libfai.a, libfsu.a, and libsunmath.a.  The other SUBDIRS will be
49# compiled normally.
50#
51
52$(SUBDIRS): FRC
53	@case $(TARGET)							\
54	in								\
55		clean|clobber|lint|_msg)				\
56			cd $@; pwd; VERSION='$(VERSION)' $(MAKE) $(TARGET);\
57			;;						\
58		*)							\
59			if [ $@ != fptest ];				\
60			then						\
61				cd $@; pwd; VERSION='$(VERSION)'	\
62				$(MAKE) $(TARGET);			\
63			else						\
64				cd $@; pwd; VERSION='$(VERSION)'	\
65				$(MAKE) __GNUC=$(POUND_SIGN) $(TARGET);	\
66			fi						\
67			;;						\
68	esac
69
70FRC:
71