Andreas Wacknitz
2024-03-31 783118944874d559e30eea1600352e3feb5263a7
tools/Makefile
@@ -18,12 +18,56 @@
#
# CDDL HEADER END
#
# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
.NOTPARALLEL:
include ../make-rules/shared-macros.mk
download setup prep build install publish validate:   time.o
#download setup prep build install publish \
#validate:   links pkglint time-$(MACH32).so time-$(MACH64).so
download setup prep build install publish validate: pkglint time-$(MACH32).so time-$(MACH64).so
clean clobber:
   $(RM) time.o
# generate wrappers for parfait. we need to generate them
# with the correct compiler variables from the common makefiles because
# some things reset the environment which causes lovely infinite
# loops
links:
   @$(MKDIR) parfait
   @for i in cc CC gcc g++ ld ; do \
      $(MKDIR) parfait ; \
      $(RM) parfait/$$i ; \
      echo "#!/bin/ksh" > parfait/$$i ; \
      echo "IFS=" >> parfait/$$i ; \
      echo "export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc" >> parfait/$$i ; \
      echo "export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++" >> parfait/$$i ; \
      echo "exec" $(PARFAIT_ROOT)/bin/parfait-$$i '$$*' >> parfait/$$i ; \
      chmod +x parfait/$$i ; \
   done
pkglint:
   @rm -f pkglint
   @sed -e "s,WS_TOP_XXX,$(WS_TOP)/$(MACH)," \
       < pkglint.sh \
       > pkglint
   @chmod +x pkglint
time-$(MACH32).o:         BITS=32
time-$(MACH64).o:         BITS=64
time-$(MACH32).o time-$(MACH64).o:   CFLAGS += $(CC_PIC)
time-$(MACH32).o time-$(MACH64).o:   time.c
   @$(CC) $(CFLAGS) -c -o $@ $<
time-%.so:   time-%.o
   @$(LD) -G -o $@ $<
clean:
   @$(RM) time-*.o time*.bc
   @$(RM) pkglint
clobber:   clean
   @$(RM) time-*.so python/pkglint/*.pyc
   @$(RM) -r parfait