< prev index next >

jdk/make/CompileDemos.gmk

Print this page


   1 #
   2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 321   # Remove the -incremental:no setting to get .ilk-files like in the old build.
 322   $$(eval $$(call SetupNativeCompilation, BUILD_DEMO_JVMTI_NATIVE_$1, \
 323       SRC := $$($1_SRC), \
 324       TOOLCHAIN := $$($1_TOOLCHAIN), \
 325       OPTIMIZATION := LOW, \
 326       CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \
 327       CXXFLAGS := $$($1_CXXFLAGS), \
 328       LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)) \
 329           $$($1_LDFLAGS), \
 330       LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
 331       LIBS := $$($1_LIBS), \
 332       LIBS_solaris := -lc, \
 333       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 334       RC_FLAGS := $$(RC_FLAGS) \
 335           -D "JDK_FNAME=$1.dll" \
 336           -D "JDK_INTERNAL_NAME=$1" \
 337           -D "JDK_FTYPE=0x2L", \
 338       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1, \
 339       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib, \
 340       LIBRARY := $1, \

 341   ))
 342 
 343   $1 += $$(BUILD_DEMO_JVMTI_NATIVE_$1)
 344 
 345   ### Build the jar, if we have java sources
 346   ifneq ($$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java), )
 347     $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_JVMTI_JAVA_$1, \
 348         SETUP := GENERATE_USINGJDKBYTECODE, \
 349         SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
 350         BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jvmti/$1, \
 351         COPY := $(COPY_TO_JAR), \
 352         JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/$1.jar, \
 353         EXTRA_MANIFEST_ATTR := Main-Class: \n, \
 354         MANIFEST := $(DEMO_MANIFEST), \
 355     ))
 356 
 357     $1 += $$(BUILD_DEMO_JVMTI_JAVA_$1_JAR)
 358   endif
 359 
 360   ### Build the source zip


 436       HEADERS := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
 437       JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/Poller.jar, \
 438       MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf, \
 439       SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/src.zip, \
 440       COPY := README.txt Poller.c, \
 441       JARMAIN := Client, \
 442   ))
 443 
 444   TARGETS += $(BUILD_DEMO_JAVA_Poller)
 445 
 446   $(eval $(call SetupNativeCompilation, BUILD_DEMO_NATIVE_Poller, \
 447       SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
 448       OPTIMIZATION := LOW, \
 449       CFLAGS := $(CFLAGS_JDKLIB) \
 450           -I$(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
 451       LDFLAGS := $(LDFLAGS_JDKLIB), \
 452       LIBS_solaris := -lc, \
 453       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller, \
 454       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native, \
 455       LIBRARY := Poller, \

 456   ))
 457 
 458   TARGETS += $(BUILD_DEMO_NATIVE_Poller)
 459 
 460   # We can only compile native code after java has been compiled (since we
 461   # depend on generated .h files)
 462   $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller/Poller.o: \
 463       $(BUILD_DEMO_JAVA_Poller)
 464 
 465   # Copy to image
 466   $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt: \
 467       $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
 468         $(call install-file)
 469         $(CHMOD) -f ug+w $@
 470 
 471   TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt
 472 
 473   $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so: \
 474       $(SUPPORT_OUTPUTDIR)/demos/native/libPoller.so
 475         $(call install-file)


   1 #
   2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 321   # Remove the -incremental:no setting to get .ilk-files like in the old build.
 322   $$(eval $$(call SetupNativeCompilation, BUILD_DEMO_JVMTI_NATIVE_$1, \
 323       SRC := $$($1_SRC), \
 324       TOOLCHAIN := $$($1_TOOLCHAIN), \
 325       OPTIMIZATION := LOW, \
 326       CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \
 327       CXXFLAGS := $$($1_CXXFLAGS), \
 328       LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)) \
 329           $$($1_LDFLAGS), \
 330       LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
 331       LIBS := $$($1_LIBS), \
 332       LIBS_solaris := -lc, \
 333       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 334       RC_FLAGS := $$(RC_FLAGS) \
 335           -D "JDK_FNAME=$1.dll" \
 336           -D "JDK_INTERNAL_NAME=$1" \
 337           -D "JDK_FTYPE=0x2L", \
 338       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1, \
 339       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib, \
 340       LIBRARY := $1, \
 341       STRIP_SYMBOLS := false, \
 342   ))
 343 
 344   $1 += $$(BUILD_DEMO_JVMTI_NATIVE_$1)
 345 
 346   ### Build the jar, if we have java sources
 347   ifneq ($$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java), )
 348     $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_JVMTI_JAVA_$1, \
 349         SETUP := GENERATE_USINGJDKBYTECODE, \
 350         SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
 351         BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jvmti/$1, \
 352         COPY := $(COPY_TO_JAR), \
 353         JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/$1.jar, \
 354         EXTRA_MANIFEST_ATTR := Main-Class: \n, \
 355         MANIFEST := $(DEMO_MANIFEST), \
 356     ))
 357 
 358     $1 += $$(BUILD_DEMO_JVMTI_JAVA_$1_JAR)
 359   endif
 360 
 361   ### Build the source zip


 437       HEADERS := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
 438       JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/Poller.jar, \
 439       MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf, \
 440       SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/src.zip, \
 441       COPY := README.txt Poller.c, \
 442       JARMAIN := Client, \
 443   ))
 444 
 445   TARGETS += $(BUILD_DEMO_JAVA_Poller)
 446 
 447   $(eval $(call SetupNativeCompilation, BUILD_DEMO_NATIVE_Poller, \
 448       SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
 449       OPTIMIZATION := LOW, \
 450       CFLAGS := $(CFLAGS_JDKLIB) \
 451           -I$(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
 452       LDFLAGS := $(LDFLAGS_JDKLIB), \
 453       LIBS_solaris := -lc, \
 454       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller, \
 455       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native, \
 456       LIBRARY := Poller, \
 457       STRIP_SYMBOLS := false, \
 458   ))
 459 
 460   TARGETS += $(BUILD_DEMO_NATIVE_Poller)
 461 
 462   # We can only compile native code after java has been compiled (since we
 463   # depend on generated .h files)
 464   $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller/Poller.o: \
 465       $(BUILD_DEMO_JAVA_Poller)
 466 
 467   # Copy to image
 468   $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt: \
 469       $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
 470         $(call install-file)
 471         $(CHMOD) -f ug+w $@
 472 
 473   TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt
 474 
 475   $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so: \
 476       $(SUPPORT_OUTPUTDIR)/demos/native/libPoller.so
 477         $(call install-file)


< prev index next >