Mike Sullivan
2012-09-14 0c2d4d19ff348dd7c2154faac6e284eec205650f
commit | author | age
ef9858 1 #
NJ 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 #
7999b2 21 # Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
ef9858 22 #
NJ 23
24 include ../make-rules/shared-macros.mk
25
7999b2 26 download setup prep build install publish \
MS 27 validate:    links time-$(MACH32).so time-$(MACH64).so
28
29 # generate wrappers for parfait. we need to generate them
30 # with the correct compiler variables from the common makefiles because
31 # some things reset the environment which causes lovely infinite
32 # loops
33 links:
34     $(MKDIR) parfait
35     @for i in cc CC gcc g++ ld ; do \
36         $(MKDIR) parfait ; \
37         $(RM) parfait/$$i ; \
38         echo "#!/bin/ksh" > parfait/$$i ; \
39         echo "IFS=" >> parfait/$$i ; \
40         echo "export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc" >> parfait/$$i ; \
41         echo "export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC" >> parfait/$$i ; \
42         echo "export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc" >> parfait/$$i ; \
43         echo "export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++" >> parfait/$$i ; \
44         echo "exec" $(PARFAIT_ROOT)/bin/parfait-$$i '$$*' >> parfait/$$i ; \
45         chmod +x parfait/$$i ; \
46     done
47
ef9858 48
61c373 49 time-$(MACH64).o:            BITS=64
NJ 50 time-$(MACH32).o time-$(MACH64).o:    CFLAGS += -Kpic
51
52 time-$(MACH32).o time-$(MACH64).o:    time.c
53     $(CC) $(CFLAGS) -c -o $@ $<
54
55 time-%.so:    time-%.o
56     $(LD) -G -o $@ $<
57
58 clean:
7999b2 59     $(RM) time-*.o time*.bc
61c373 60
NJ 61 clobber:    clean
7999b2 62     $(RM) time-*.so python/pkglint/*.pyc
MS 63     $(RM) -r parfait
64