Home | History | Annotate | Download | only in fps
      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 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 
     26 include ../Makefile.cmd
     27 
     28 .KEEP_STATE:
     29 
     30 all := TARGET = all
     31 clean := TARGET = clean
     32 clobber := TARGET = clobber
     33 install := TARGET = install
     34 lint := TARGET = lint
     35 _msg := TARGET = _msg
     36 check := TARGET = check
     37 
     38 SUBDIRS = fpsd compilercheck fptest
     39 
     40 all clean clobber install lint _msg: $(SUBDIRS)
     41 
     42 check: fpsd
     43 
     44 #
     45 # Note that the compilation of fptest is handled differently.
     46 # If the primary compiler is not a Sun Studio compiler, fptest will
     47 # *not* be compiled. This is because fptest is dependent on some Sun
     48 # performance libraries provided as part of the Sun Studio compiler
     49 # installation. fptest statically links libsunperf.a, libfui.a,
     50 # libfai.a, libfsu.a, and libsunmath.a. The other SUBDIRS will be
     51 # compiled.
     52 #
     53 # If the make macro __GNUC is "#", it means Sun Studio compiler is being
     54 # used for the compilation.
     55 #
     56 
     57 $(SUBDIRS): FRC
     58 	@case $(TARGET)							\
     59 	in								\
     60 		clean|clobber|lint|_msg)				\
     61 			cd $@; pwd; VERSION='$(VERSION)' $(MAKE) $(TARGET);\
     62 			;;						\
     63 		*)							\
     64 			if [ $@ != fptest ];				\
     65 			then						\
     66 				cd $@; pwd; VERSION='$(VERSION)' $(MAKE) \
     67                                 $(TARGET);									\
     68 			else						\
     69 				if [ "$(__GNUC)" = "#" ];               \
     70 				then					\
     71 					cd $@; pwd; VERSION='$(VERSION)' \
     72                                         $(MAKE) $(TARGET);								\
     73 				fi					\
     74 			fi						\
     75 			;;						\
     76 	esac
     77 
     78 FRC:
     79