jdk/makefiles/common/Demo.gmk
changeset 12317 9670c1610c53
equal deleted inserted replaced
12316:ba6b7a51e226 12317:9670c1610c53
       
     1 #
       
     2 # Copyright (c) 2004, 2011, 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
       
    23 # questions.
       
    24 #
       
    25 
       
    26 COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
       
    27 COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
       
    28 LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) 
       
    29 LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) 
       
    30 
       
    31 # JDK Demo building jar file.
       
    32   
       
    33 # Some names are defined with LIBRARY inside the Defs.gmk file
       
    34 LIBRARY=$(DEMONAME)
       
    35 OBJDIR=$(TEMPDIR)/$(DEMONAME)
       
    36 
       
    37 # Input:
       
    38 #    DEMONAME           - name of the demo
       
    39 #    DEMO_ROOT          - path to root of all demo files
       
    40 #    DEMO_DESTDIR       - path to final demo destination directory
       
    41 #
       
    42 # Optional Input:
       
    43 #    DEMO_SRCDIR        - path to source if different from DEMO_ROOT
       
    44 #    DEMO_PSRCDIR       - path to additional platform specific source
       
    45 #    DEMO_PKGDIR        - sub directory of sources we want
       
    46 #    DEMO_TOPFILES      - names of top-level files relative to DEMO_ROOT
       
    47 #    DEMO_MAINCLASS     - name of the main class for the jar manifest
       
    48 #    DEMO_NATIVECLASS   - name of the class with native methods
       
    49 #    DEMO_DESCRIPTOR    - name of service file for jar (relative to DEMO_SRCDIR)
       
    50 #    DEMO_EXTRA_SRCDIR  - path to directory that holds extra sources to add
       
    51 #    DEMO_EXTRA_FILES   - extra sources relative to DEMO_EXTRA_SRCDIR
       
    52 #    DEMO_OBJECTS       - extra native object files needed
       
    53 #    DEMO_MANIFEST_ATTR - extra line to add to the jar manifest file
       
    54 
       
    55 # Assume the source directory is the root directory if not set
       
    56 ifndef DEMO_SRCDIR
       
    57   DEMO_SRCDIR = $(DEMO_ROOT)
       
    58 endif
       
    59 ifndef DEMO_PKGDIR
       
    60   DEMO_PKGDIR = .
       
    61 endif
       
    62 
       
    63 # Some demos have special needs
       
    64 ifneq ($(DEMONAME),agent_util)
       
    65   DEMO_NEEDS_AGENT_UTIL    = $(findstring agent_util,$(DEMO_OBJECTS))
       
    66 endif
       
    67 ifneq ($(DEMONAME),java_crw_demo)
       
    68   DEMO_NEEDS_JAVA_CRW_DEMO = $(findstring java_crw_demo,$(DEMO_OBJECTS))
       
    69 endif
       
    70 ifeq ($(DEMONAME),hprof)
       
    71   DEMO_NEEDS_NPT           = true
       
    72 endif
       
    73 
       
    74 # Place to hold the build area (kind of a temp area)
       
    75 DEMO_BUILD_AREA     = $(DEMOCLASSDIR)/$(PRODUCT)/$(DEMONAME)
       
    76 
       
    77 # Destination "src" directory
       
    78 DEMO_BUILD_SRCDIR     = $(DEMO_BUILD_AREA)/src
       
    79 
       
    80 ifndef DEMO_SKIP_SRCZIP
       
    81   DEMO_BUILD_SRCZIP     = $(DEMO_BUILD_AREA)/src.zip
       
    82   DEMO_SOURCE_ZIP       = $(DEMO_DESTDIR)/src.zip
       
    83 endif
       
    84 
       
    85 # Place to hold the jar image we are creating
       
    86 DEMO_JAR_IMAGE      = $(DEMO_BUILD_AREA)/jar_image
       
    87 
       
    88 # The jar manifest file we will create and use
       
    89 DEMO_MANIFEST       = $(DEMO_BUILD_AREA)/manifest.mf
       
    90 
       
    91 # The list of source files or options we will supply to javac
       
    92 DEMO_JAVAC_INPUT    = $(DEMO_BUILD_AREA)/javac_input.txt
       
    93 
       
    94 # Any name of javah file
       
    95 DEMO_JAVAH_FILE = $(DEMO_NATIVECLASS:%=$(DEMO_BUILD_SRCDIR)/%.h)
       
    96 
       
    97 # Get complete list of files for this demo
       
    98 ifdef DEMO_PSRCDIR
       
    99   DEMO_ALL_FILES2  := $(shell ( $(CD) $(DEMO_PSRCDIR) \
       
   100     && $(FIND) $(DEMO_PKGDIR) $(SCM_DIRS_prune) -o -type f -print ) \
       
   101     | $(SED) 's@^\./@@' )
       
   102   DEMO_ALL_FILES   += $(DEMO_ALL_FILES2)
       
   103 endif
       
   104 ifdef DEMO_EXTRA_SRCDIR
       
   105   DEMO_ALL_FILES   += $(DEMO_EXTRA_FILES)
       
   106 endif
       
   107 DEMO_ALL_FILES1    := $(shell ( $(CD) $(DEMO_SRCDIR) \
       
   108   && $(FIND) $(DEMO_PKGDIR) $(SCM_DIRS_prune) -o -type f -print ) \
       
   109   | $(SED) 's@^\./@@' )
       
   110 DEMO_ALL_FILES      += $(DEMO_ALL_FILES1)
       
   111 
       
   112 # Just the java sources
       
   113 DEMO_JAVA_SOURCES = $(filter %.java,$(DEMO_ALL_FILES))
       
   114 
       
   115 # Just the C and C++ sources
       
   116 DEMO_C_SRC_FILES   = $(filter %.c,$(DEMO_ALL_FILES))
       
   117 DEMO_CPP_SRC_FILES = $(filter %.cpp,$(DEMO_ALL_FILES))
       
   118 
       
   119 # All the native source files
       
   120 DEMO_ALL_NATIVE_SOURCES  = $(DEMO_C_SRC_FILES)
       
   121 DEMO_ALL_NATIVE_SOURCES += $(DEMO_CPP_SRC_FILES)
       
   122 DEMO_ALL_NATIVE_SOURCES += $(filter %.h,$(DEMO_ALL_FILES))
       
   123 DEMO_ALL_NATIVE_SOURCES += $(filter %.hpp,$(DEMO_ALL_FILES))
       
   124 
       
   125 # If we have java sources, then define the jar file we will create
       
   126 ifndef DEMO_JAR_NAME
       
   127   DEMO_JAR_NAME = $(DEMONAME).jar
       
   128 endif
       
   129 ifneq ($(strip $(DEMO_JAVA_SOURCES)),)
       
   130   DEMO_JAR            = $(DEMO_DESTDIR)/$(DEMO_JAR_NAME)
       
   131 endif
       
   132 
       
   133 # If we have native sources, define the native library we will create
       
   134 ifneq ($(strip $(DEMO_ALL_NATIVE_SOURCES)),)
       
   135   # Path to native library we will create
       
   136   DEMO_LIBRARY = \
       
   137       $(DEMO_DESTDIR)/lib$(ISA_DIR)/$(LIB_PREFIX)$(DEMONAME).$(LIBRARY_SUFFIX)
       
   138   # C and C++ compiler flags we need to add to standard flags
       
   139   DEMO_CPPFLAGS     += -I$(DEMO_BUILD_SRCDIR)
       
   140   # If the npt library is used we need to find the npt.h file
       
   141   ifneq ($(DEMO_NEEDS_NPT),)
       
   142     # The npt library is delivered as part of the JRE
       
   143     DEMO_CPPFLAGS   += -I$(SHARE_SRC)/npt -I$(PLATFORM_SRC)/npt
       
   144   endif
       
   145   # Is the shared agent_util code needed
       
   146   ifneq ($(DEMO_NEEDS_AGENT_UTIL),)
       
   147     DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/agent_util.c
       
   148     DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/agent_util.h
       
   149   endif
       
   150   # Is the shared java_crw_demo code needed
       
   151   ifneq ($(DEMO_NEEDS_JAVA_CRW_DEMO),)
       
   152     DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/java_crw_demo.c
       
   153     DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/java_crw_demo.h
       
   154   endif
       
   155   # All the native object files we need to build the library
       
   156   DEMO_OBJECTS += $(DEMO_C_SRC_FILES:%.c=%.$(OBJECT_SUFFIX)) \
       
   157                   $(DEMO_CPP_SRC_FILES:%.cpp=%.$(OBJECT_SUFFIX))
       
   158   # Linking is special depending on whether we had C++ code or on windows
       
   159   DEMO_NEEDS_CPP = $(strip $(DEMO_CPP_SRC_FILES))
       
   160   CPPFLAGS      += $(DEMO_CPPFLAGS)
       
   161   ifeq ($(PLATFORM),windows)
       
   162     # Note: This is a link with cl.exe, not link.exe, options differ quite
       
   163     #       bit between them.
       
   164     LINK.demo   = $(LINK.c)
       
   165     LDLIBS.demo = $(EXTRA_LIBS) $(LFLAGS_$(COMPILER_VERSION))
       
   166     DEMO_VERSION_INFO = $(OBJDIR)/$(LIBRARY).res
       
   167     LDLIBS.demo += $(DEMO_VERSION_INFO)
       
   168   else
       
   169     ifneq ($(DEMO_NEEDS_CPP),)
       
   170       LINK.demo   = $(LINK.cpp)
       
   171       LDLIBS.demo = $(LIBCXX)
       
   172       ifeq ($(PLATFORM),solaris)
       
   173         LDLIBS.demo += -lc
       
   174       endif
       
   175     else
       
   176       LINK.demo   = $(LINK.c)
       
   177       LDLIBS.demo = $(LDLIBS)
       
   178     endif
       
   179   endif
       
   180 endif
       
   181 
       
   182 # Files that are considered resources (need to be in the jar file)
       
   183 DEMO_RESOURCES        += $(filter-out %.java,$(DEMO_ALL_FILES))
       
   184 
       
   185 # All destination files (top level readme files and all sources)
       
   186 #   Note: We exclude the topfiles from the src tree.
       
   187 DEMO_DEST_TOPFILES     = $(DEMO_TOPFILES:%=$(DEMO_DESTDIR)/%)
       
   188 DEMO_FILTERED_SOURCES  = $(filter-out $(DEMO_TOPFILES),$(DEMO_ALL_FILES))
       
   189 DEMO_FULL_SOURCES     += $(DEMO_FILTERED_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%)
       
   190 
       
   191 # Default rule
       
   192 all: build demo_info
       
   193 
       
   194 # Used to populate the destination directories
       
   195 $(DEMO_DESTDIR)/%: $(DEMO_ROOT)/%
       
   196 	$(install-file)
       
   197 ifneq ($(DEMO_SRCDIR),$(DEMO_ROOT))
       
   198 $(DEMO_DESTDIR)/%: $(DEMO_SRCDIR)/%
       
   199 	$(install-file)
       
   200 endif
       
   201 $(DEMO_BUILD_SRCDIR)/%: $(DEMO_SRCDIR)/%
       
   202 	$(install-file)
       
   203 ifdef DEMO_PSRCDIR
       
   204 $(DEMO_BUILD_SRCDIR)/%: $(DEMO_PSRCDIR)/%
       
   205 	$(install-file)
       
   206 endif
       
   207 ifdef DEMO_EXTRA_SRCDIR
       
   208 $(DEMO_BUILD_SRCDIR)/%: $(DEMO_EXTRA_SRCDIR)/%
       
   209 	$(install-file)
       
   210 endif
       
   211 ifneq ($(DEMO_NEEDS_AGENT_UTIL),)
       
   212 $(DEMO_BUILD_SRCDIR)/%: $(DEMO_SRCDIR)/../agent_util/%
       
   213 	$(install-file)
       
   214 endif
       
   215 ifneq ($(DEMO_NEEDS_JAVA_CRW_DEMO),)
       
   216 $(DEMO_BUILD_SRCDIR)/%: $(DEMO_SRCDIR)/../java_crw_demo/%
       
   217 	$(install-file)
       
   218 endif
       
   219 
       
   220 # Jar manifest file
       
   221 MAINMANIFEST  = $(JDK_TOPDIR)/make/tools/manifest.mf
       
   222 $(DEMO_MANIFEST): $(MAINMANIFEST)
       
   223 	@$(prep-target)
       
   224 	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
       
   225                -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
       
   226                $(MAINMANIFEST) >> $@
       
   227 	$(ECHO) "Main-Class: $(DEMO_MAINCLASS)" >> $@
       
   228 ifdef DEMO_MANIFEST_ATTR
       
   229 	$(ECHO) "$(DEMO_MANIFEST_ATTR)" >> $@
       
   230 endif
       
   231 
       
   232 # Populating the jar image directory
       
   233 $(DEMO_JAR_IMAGE)/%: $(DEMO_SRCDIR)/%
       
   234 	$(install-file)
       
   235 ifdef DEMO_PSRCDIR
       
   236 $(DEMO_JAR_IMAGE)/%: $(DEMO_PSRCDIR)/%
       
   237 	$(install-file)
       
   238 endif
       
   239 ifdef DEMO_EXTRA_SRCDIR
       
   240 $(DEMO_JAR_IMAGE)/%: $(DEMO_EXTRA_SRCDIR)/%
       
   241 	$(install-file)
       
   242 endif
       
   243 ifdef DEMO_DESCRIPTOR
       
   244 $(DEMO_JAR_IMAGE)/META-INF/services/$(DEMO_DESCRIPTOR): \
       
   245     $(DEMO_SRCDIR)/$(DEMO_DESCRIPTOR)
       
   246 	$(install-file)
       
   247 endif
       
   248 
       
   249 # If we are creating a jar file (we have java code)
       
   250 ifdef DEMO_JAR
       
   251 
       
   252 # Input file for javac
       
   253 $(DEMO_JAVAC_INPUT): $(DEMO_JAVA_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%)
       
   254 	@$(prep-target)
       
   255 	@for i in $(DEMO_JAVA_SOURCES) ; do \
       
   256 	  $(ECHO) "$(DEMO_BUILD_SRCDIR)/$$i" >> $@ ; \
       
   257 	done
       
   258 
       
   259 # Jar file creation
       
   260 $(DEMO_JAR): \
       
   261     $(DEMO_JAVAC_INPUT) \
       
   262     $(DEMO_MANIFEST) \
       
   263     $(DEMO_DESCRIPTOR:%=$(DEMO_JAR_IMAGE)/META-INF/services/%) \
       
   264     $(DEMO_RESOURCES:%=$(DEMO_JAR_IMAGE)/%)
       
   265 	@$(prep-target)
       
   266 	$(MKDIR) -p $(DEMO_JAR_IMAGE)
       
   267 	$(JAVAC_CMD) -d $(DEMO_JAR_IMAGE) -sourcepath $(DEMO_BUILD_SRCDIR) \
       
   268 	    @$(DEMO_JAVAC_INPUT)
       
   269   ifeq ($(DEMO_INCL_SRC),true)
       
   270 	$(CP) $(DEMO_JAVA_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%) $(DEMO_JAR_IMAGE)
       
   271   endif
       
   272   ifeq ($(DEMO_ONLY_SRC),true)
       
   273 	$(RM) -r $(DEMO_JAR_IMAGE)
       
   274 	$(MKDIR) -p $(DEMO_JAR_IMAGE)
       
   275 	$(CP) -r $(DEMO_BUILD_SRCDIR)/* $(DEMO_JAR_IMAGE)
       
   276     ifneq ($(DEMO_TOPFILES),)
       
   277 	$(CP) $(DEMO_ROOT)/$(DEMO_TOPFILES) $(DEMO_JAR_IMAGE)
       
   278     endif
       
   279   endif
       
   280 	$(BOOT_JAR_CMD) -cfm $@ $(DEMO_MANIFEST) \
       
   281 	     -C $(DEMO_JAR_IMAGE) . \
       
   282 	     $(BOOT_JAR_JFLAGS)
       
   283 	@$(java-vm-cleanup)
       
   284 
       
   285 endif
       
   286 
       
   287 ifndef DEMO_SKIP_SRCZIP
       
   288   # Create a src.zip file
       
   289   $(DEMO_BUILD_SRCZIP): $(DEMO_FULL_SOURCES)
       
   290 	@$(prep-target)
       
   291 	$(CD) $(DEMO_BUILD_AREA)/src && $(ZIPEXE) -q -r ../$(@F) .
       
   292 
       
   293   # Install the destination src.zip file and create the src tree
       
   294   $(DEMO_SOURCE_ZIP): $(DEMO_BUILD_SRCZIP)
       
   295 	$(install-file)
       
   296 endif
       
   297 
       
   298 ifeq ($(PLATFORM),windows)
       
   299 # JDK name required here
       
   300 RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
       
   301             /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
       
   302             /D "JDK_FTYPE=0x2L"
       
   303 endif
       
   304 
       
   305 # Native library building
       
   306 ifdef DEMO_LIBRARY
       
   307 
       
   308   # Full paths to object files
       
   309   DEMO_FULL_OBJECTS = $(DEMO_OBJECTS:%=$(OBJDIR)/%)
       
   310   VPATH=
       
   311 
       
   312 # Native compile rules
       
   313 $(OBJDIR)/%.$(OBJECT_SUFFIX): $(DEMO_BUILD_SRCDIR)/%.c
       
   314 	@$(prep-target)
       
   315 	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
       
   316   ifneq ($(DEMO_NEEDS_CPP),)
       
   317 $(OBJDIR)/%.$(OBJECT_SUFFIX): $(DEMO_BUILD_SRCDIR)/%.cpp
       
   318 	@$(prep-target)
       
   319 	$(COMPILE.cpp) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
       
   320   endif
       
   321 
       
   322   # Actual creation of the native shared library (C++ and C are different)
       
   323 $(DEMO_LIBRARY): $(DEMO_FULL_OBJECTS)
       
   324 	@$(prep-target)
       
   325   ifeq ($(PLATFORM),windows)
       
   326 	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(DEMO_VERSION_INFO) $(VERSIONINFO_RESOURCE)
       
   327 	$(LINK.demo) $(SHARED_LIBRARY_FLAG) -Fe$@ \
       
   328 	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
       
   329   else
       
   330 	$(LINK.demo) $(SHARED_LIBRARY_FLAG) -o $@ \
       
   331 	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
       
   332   endif
       
   333 	@$(call binary_file_verification,$@)
       
   334 
       
   335   # Generation of any javah include file, make sure objects are dependent on it
       
   336   ifdef DEMO_NATIVECLASS
       
   337 $(DEMO_JAVAH_FILE): $(DEMO_JAR)
       
   338 	@$(prep-target)
       
   339 	$(JAVAH_CMD) -d $(DEMO_BUILD_SRCDIR) -classpath $(DEMO_JAR) \
       
   340 	    $(DEMO_NATIVECLASS)
       
   341 	@$(java-vm-cleanup)
       
   342 $(DEMO_FULL_OBJECTS): $(DEMO_JAVAH_FILE)
       
   343   endif
       
   344 
       
   345 endif
       
   346 
       
   347 # Build involves populating the destination "src" tree, building the jar and
       
   348 #     native library, and creating a source bundle
       
   349 
       
   350 sources:  $(DEMO_FULL_SOURCES)
       
   351 	@$(ECHO) "Created $@"
       
   352 
       
   353 objects: 
       
   354 	@$(ECHO) "Created $@"
       
   355 
       
   356 # Why the nested make here? It only works this way, don't know why.
       
   357 bundles: $(DEMO_BUILD_SRCZIP)
       
   358 	$(RM) -r $(DEMO_DESTDIR)
       
   359 	$(MKDIR) -p $(DEMO_DESTDIR)
       
   360 	$(MAKE) $(DEMO_LIBRARY) $(DEMO_JAR) $(DEMO_SOURCE_ZIP) $(DEMO_DEST_TOPFILES)
       
   361 # Applets are special, no jar file, no src.zip, everything expanded.
       
   362 ifdef DEMO_IS_APPLET
       
   363 	@$(ECHO) "Expanding jar file into demos area at $(DEMO_DESTDIR)"
       
   364 	( $(CD) $(DEMO_DESTDIR) && \
       
   365 	  $(BOOT_JAR_CMD) -xfv $(DEMO_JAR_NAME) \
       
   366 	     $(BOOT_JAR_JFLAGS) && \
       
   367 	  $(RM) -r META-INF $(DEMO_JAR_NAME) && \
       
   368 	  $(java-vm-cleanup) )
       
   369 	@( $(CD) $(DEMO_DESTDIR) && $(java-vm-cleanup) )
       
   370 	@$(ECHO) "Expanding source into demos area at $(DEMO_DESTDIR)"
       
   371 	( $(CD) $(DEMO_DESTDIR) && $(UNZIP) -o src.zip && $(RM) src.zip )
       
   372 endif
       
   373 
       
   374 build: sources bundles
       
   375 
       
   376 # Printing out a demo information line
       
   377 define printDemoSetting
       
   378 if [ "$2" != "" ] ; then $(PRINTF) "%-20s %s\n" "$1:" "$2"; fi
       
   379 endef
       
   380 
       
   381 # Print out the demo information
       
   382 demo_info:
       
   383 	@$(ECHO) "========================================================="
       
   384 	@$(call printDemoSetting,DEMONAME,$(DEMONAME))
       
   385 	@$(call printDemoSetting,DEMO_ROOT,$(DEMO_ROOT))
       
   386 	@$(call printDemoSetting,DEMO_SRCDIR,$(DEMO_SRCDIR))
       
   387 	@$(call printDemoSetting,DEMO_DESTDIR,$(DEMO_DESTDIR))
       
   388 	@$(call printDemoSetting,DEMO_JAR,$(DEMO_JAR))
       
   389 	@$(call printDemoSetting,DEMO_MANIFEST_ATTR,$(DEMO_MANIFEST_ATTR))
       
   390 	@$(call printDemoSetting,DEMO_PSRCDIR,$(DEMO_PSRCDIR))
       
   391 	@$(call printDemoSetting,DEMO_EXTRA_SRCDIR,$(DEMO_EXTRA_SRCDIR))
       
   392 	@$(call printDemoSetting,DEMO_EXTRA_FILES,$(DEMO_EXTRA_FILES))
       
   393 	@$(call printDemoSetting,DEMO_TOPFILES,$(DEMO_TOPFILES))
       
   394 	@$(call printDemoSetting,DEMO_MAINCLASS,$(DEMO_MAINCLASS))
       
   395 	@$(call printDemoSetting,DEMO_DESCRIPTOR,$(DEMO_DESCRIPTOR))
       
   396 	@$(call printDemoSetting,DEMO_NATIVECLASS,$(DEMO_NATIVECLASS))
       
   397 	@$(call printDemoSetting,DEMO_LIBRARY,$(DEMO_LIBRARY))
       
   398 	@$(call printDemoSetting,DEMO_OBJECTS,$(DEMO_OBJECTS))
       
   399 	@$(call printDemoSetting,DEMO_SOURCE_ZIP,$(DEMO_SOURCE_ZIP))
       
   400 	@$(ECHO) "========================================================="
       
   401 
       
   402 # Clean rule
       
   403 clean clobber:
       
   404 	$(RM) -r $(DEMO_BUILD_AREA)
       
   405 	$(RM) -r $(DEMO_DESTDIR)
       
   406 
       
   407 # This should not be needed, but some versions of GNU make have a bug that
       
   408 #   sometimes deleted these files  for some strange  and unknown reason 
       
   409 #   (GNU make version 3.78.1 has the problem, GNU make version 3.80 doesn't?)
       
   410 .PRECIOUS: $(DEMO_FULL_SOURCES) $(DEMO_BUILD_SRCZIP) $(DEMO_SOURCE_ZIP)
       
   411 
       
   412 # List phony targets
       
   413 .PHONY: all build clean clobber demo_info \
       
   414 	sources bundles
       
   415