413 SKIP_METAINF := true, \ |
412 SKIP_METAINF := true, \ |
414 MANIFEST := $(MAINMANIFEST), \ |
413 MANIFEST := $(MAINMANIFEST), \ |
415 CHECK_COMPRESS_JAR := true)) |
414 CHECK_COMPRESS_JAR := true)) |
416 |
415 |
417 ########################################################################################## |
416 ########################################################################################## |
418 # Create manifest for security jars |
|
419 |
|
420 # |
|
421 # Include these extra attributes for now, should probably take out. |
|
422 # |
|
423 JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf |
|
424 $(JCE_MANIFEST): $(MAINMANIFEST) |
|
425 $(MKDIR) -p $(@D) |
|
426 $(RM) $@ $@.tmp |
|
427 $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \ |
|
428 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \ |
|
429 $(MAINMANIFEST) >> $@.tmp |
|
430 $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp |
|
431 $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp |
|
432 $(MV) $@.tmp $@ |
|
433 |
|
434 ########################################################################################## |
|
435 # For security and crypto jars, always build the jar, but for closed, install the prebuilt |
|
436 # signed version instead of the newly built jar. Unsigned jars are treated as intermediate |
|
437 # targets and explicitly added to the JARS list. For open, signing is not needed. See |
|
438 # SignJars.gmk for more information. |
|
439 # |
|
440 # The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO |
|
441 # variable is set to no if these jars can't be built to skip that step of the build. |
|
442 # Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no |
|
443 # other way to get the jars than to build them. |
|
444 |
|
445 SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar |
|
446 SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar |
|
447 |
|
448 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \ |
|
449 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
|
450 SUFFIXES := .class, \ |
|
451 INCLUDES := sun/security/pkcs11, \ |
|
452 JAR := $(SUNPKCS11_JAR_UNSIGNED), \ |
|
453 MANIFEST := $(JCE_MANIFEST), \ |
|
454 SKIP_METAINF := true)) |
|
455 |
|
456 $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST) |
|
457 |
|
458 ifndef OPENJDK |
|
459 SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar |
|
460 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC) |
|
461 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..." |
|
462 $(install-file) |
|
463 else |
|
464 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED) |
|
465 $(install-file) |
|
466 endif |
|
467 |
|
468 JARS += $(SUNPKCS11_JAR_UNSIGNED) |
|
469 |
|
470 ########################################################################################## |
|
471 |
|
472 SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar |
|
473 SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar |
|
474 |
|
475 $(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \ |
|
476 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
|
477 SUFFIXES := .class, \ |
|
478 INCLUDES := sun/security/ec, \ |
|
479 JAR := $(SUNEC_JAR_UNSIGNED), \ |
|
480 MANIFEST := $(JCE_MANIFEST), \ |
|
481 SKIP_METAINF := true)) |
|
482 |
|
483 $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST) |
|
484 |
|
485 ifndef OPENJDK |
|
486 SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar |
|
487 $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC) |
|
488 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..." |
|
489 $(install-file) |
|
490 else |
|
491 $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED) |
|
492 $(install-file) |
|
493 endif |
|
494 |
|
495 JARS += $(SUNEC_JAR_UNSIGNED) |
|
496 |
|
497 ########################################################################################## |
|
498 |
417 |
499 $(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \ |
418 $(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \ |
500 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
419 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
501 SUFFIXES := BeanInfo.class .gif, \ |
420 SUFFIXES := BeanInfo.class .gif, \ |
502 INCLUDES := javax/swing sun/swing, \ |
421 INCLUDES := javax/swing sun/swing, \ |
503 EXCLUDES := javax/swing/plaf, \ |
422 EXCLUDES := javax/swing/plaf, \ |
504 EXTRA_FILES := javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class, \ |
423 EXTRA_FILES := javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class, \ |
505 JAR := $(IMAGES_OUTPUTDIR)/lib/dt.jar, \ |
424 JAR := $(IMAGES_OUTPUTDIR)/lib/dt.jar, \ |
506 SKIP_METAINF := true)) |
425 SKIP_METAINF := true)) |
507 |
|
508 ########################################################################################## |
|
509 |
|
510 SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar |
|
511 SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar |
|
512 |
|
513 ifneq ($(BUILD_CRYPTO), no) |
|
514 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \ |
|
515 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
|
516 SUFFIXES := .class, \ |
|
517 INCLUDES := com/sun/crypto/provider, \ |
|
518 JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \ |
|
519 MANIFEST := $(JCE_MANIFEST), \ |
|
520 SKIP_METAINF := true)) |
|
521 |
|
522 $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST) |
|
523 |
|
524 JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED) |
|
525 endif |
|
526 |
|
527 ifndef OPENJDK |
|
528 SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar |
|
529 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC) |
|
530 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..." |
|
531 $(install-file) |
|
532 else |
|
533 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED) |
|
534 $(install-file) |
|
535 endif |
|
536 |
|
537 ########################################################################################## |
|
538 |
|
539 JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar |
|
540 JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar |
|
541 |
|
542 ifneq ($(BUILD_CRYPTO), no) |
|
543 $(eval $(call SetupArchive,BUILD_JCE_JAR, , \ |
|
544 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
|
545 SUFFIXES := .class, \ |
|
546 INCLUDES := javax/crypto sun/security/internal, \ |
|
547 JAR := $(JCE_JAR_UNSIGNED), \ |
|
548 MANIFEST := $(JCE_MANIFEST), \ |
|
549 SKIP_METAINF := true)) |
|
550 |
|
551 $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST) |
|
552 |
|
553 JARS += $(JCE_JAR_UNSIGNED) |
|
554 endif |
|
555 |
|
556 ifndef OPENJDK |
|
557 JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar |
|
558 $(JCE_JAR_DST): $(JCE_JAR_SRC) |
|
559 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..." |
|
560 $(install-file) |
|
561 else |
|
562 $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED) |
|
563 $(install-file) |
|
564 endif |
|
565 |
|
566 ########################################################################################## |
|
567 |
|
568 US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar |
|
569 US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar |
|
570 |
|
571 ifneq ($(BUILD_CRYPTO), no) |
|
572 # |
|
573 # TODO fix so that SetupArchive does not write files into SRCS |
|
574 # then we don't need this extra copying |
|
575 |
|
576 # NOTE: We currently do not place restrictions on our limited export |
|
577 # policy. This was not a typo. |
|
578 # |
|
579 US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited |
|
580 US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp |
|
581 |
|
582 $(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/% |
|
583 $(install-file) |
|
584 |
|
585 US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy |
|
586 |
|
587 $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \ |
|
588 SRCS := $(US_EXPORT_POLICY_JAR_TMP), \ |
|
589 SUFFIXES := .policy, \ |
|
590 JAR := $(US_EXPORT_POLICY_JAR_UNSIGNED), \ |
|
591 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ |
|
592 SKIP_METAINF := true)) |
|
593 |
|
594 JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED) |
|
595 endif |
|
596 |
|
597 ifndef OPENJDK |
|
598 $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar |
|
599 $(ECHO) $(LOG_INFO) Copying $(@F) |
|
600 $(install-file) |
|
601 else |
|
602 $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED) |
|
603 $(install-file) |
|
604 endif |
|
605 |
|
606 ########################################################################################## |
|
607 |
|
608 LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar |
|
609 LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar |
|
610 |
|
611 ifneq ($(BUILD_CRYPTO), no) |
|
612 # |
|
613 # TODO fix so that SetupArchive does not write files into SRCS |
|
614 # then we don't need this extra copying |
|
615 # |
|
616 LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp |
|
617 |
|
618 ifeq ($(UNLIMITED_CRYPTO), true) |
|
619 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited |
|
620 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy |
|
621 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited |
|
622 else |
|
623 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited |
|
624 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \ |
|
625 $(LOCAL_POLICY_JAR_TMP)/default_local.policy |
|
626 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited |
|
627 endif |
|
628 |
|
629 $(LOCAL_POLICY_JAR_TMP)/%: $(LOCAL_POLICY_JAR_SRC_DIR)/% |
|
630 $(install-file) |
|
631 |
|
632 $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR, $(LOCAL_POLICY_JAR_DEPS), \ |
|
633 SRCS := $(LOCAL_POLICY_JAR_TMP), \ |
|
634 SUFFIXES := .policy, \ |
|
635 JAR := $(LOCAL_POLICY_JAR_UNSIGNED), \ |
|
636 EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \ |
|
637 SKIP_METAINF := true)) |
|
638 |
|
639 JARS += $(LOCAL_POLICY_JAR_UNSIGNED) |
|
640 endif |
|
641 |
|
642 ifndef OPENJDK |
|
643 $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar |
|
644 $(ECHO) $(LOG_INFO) Copying $(@F) |
|
645 $(install-file) |
|
646 else |
|
647 $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED) |
|
648 $(install-file) |
|
649 endif |
|
650 |
|
651 ########################################################################################## |
|
652 |
|
653 ifeq ($(OPENJDK_TARGET_OS), windows) |
|
654 |
|
655 SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar |
|
656 SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar |
|
657 |
|
658 $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \ |
|
659 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
|
660 SUFFIXES := .class, \ |
|
661 INCLUDES := sun/security/mscapi, \ |
|
662 JAR := $(SUNMSCAPI_JAR_UNSIGNED), \ |
|
663 MANIFEST := $(JCE_MANIFEST), \ |
|
664 SKIP_METAINF := true)) |
|
665 |
|
666 $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST) |
|
667 |
|
668 ifndef OPENJDK |
|
669 SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar |
|
670 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC) |
|
671 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..." |
|
672 $(install-file) |
|
673 else |
|
674 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED) |
|
675 $(install-file) |
|
676 endif |
|
677 |
|
678 JARS += $(SUNMSCAPI_JAR_UNSIGNED) |
|
679 |
|
680 endif |
|
681 |
|
682 ########################################################################################## |
|
683 |
|
684 ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
685 ifndef OPENJDK |
|
686 |
|
687 UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar |
|
688 UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar |
|
689 UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar |
|
690 |
|
691 $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \ |
|
692 SRCS := $(JDK_OUTPUTDIR)/classes, \ |
|
693 SUFFIXES := .class, \ |
|
694 INCLUDES := com/oracle/security/ucrypto, \ |
|
695 JAR := $(UCRYPTO_JAR_UNSIGNED), \ |
|
696 MANIFEST := $(JCE_MANIFEST), \ |
|
697 SKIP_METAINF := true)) |
|
698 |
|
699 $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST) |
|
700 |
|
701 $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC) |
|
702 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..." |
|
703 $(install-file) |
|
704 |
|
705 JARS += $(UCRYPTO_JAR_UNSIGNED) |
|
706 |
|
707 endif |
|
708 endif |
|
709 |
426 |
710 ########################################################################################## |
427 ########################################################################################## |
711 |
428 |
712 # Get the CLDRVERSION |
429 # Get the CLDRVERSION |
713 include gensrc/GensrcCLDR.gmk |
430 include gensrc/GensrcCLDR.gmk |