4632N/A#
4632N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
4632N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4632N/A#
4632N/A# This code is free software; you can redistribute it and/or modify it
4632N/A# under the terms of the GNU General Public License version 2 only, as
4632N/A# published by the Free Software Foundation. Oracle designates this
4632N/A# particular file as subject to the "Classpath" exception as provided
4632N/A# by Oracle in the LICENSE file that accompanied this code.
4632N/A#
4632N/A# This code is distributed in the hope that it will be useful, but WITHOUT
4632N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4632N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4632N/A# version 2 for more details (a copy is included in the LICENSE file that
4632N/A# accompanied this code).
4632N/A#
4632N/A# You should have received a copy of the GNU General Public License version
4632N/A# 2 along with this work; if not, write to the Free Software Foundation,
4632N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4632N/A#
4632N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4632N/A# or visit www.oracle.com if you need additional information or have any
4632N/A# questions.
4632N/A#
4632N/A
4632N/A#
4632N/A# Makefile for building jobjc
4632N/A
4632N/ABUILDDIR = ../..
4632N/Ainclude $(BUILDDIR)/common/Defs.gmk
4632N/ASRCDIR = $(JDK_TOPDIR)/src/macosx/native/jobjc
4632N/A
4632N/Aifeq ($(PLATFORM),macosx)
4632N/A
4632N/A# FRAMEWORKS for which we want to build bridge support
4632N/AFRAMEWORKS = Foundation CoreFoundation AppKit
4632N/A
4632N/A# metadata stuff
4632N/AGEN_DIR = $(OUTPUTDIR)/bridge_metadata
4632N/ASTABLE_GEN_DIR = $(OUTPUTDIR)/stable_bridge_metadata
4632N/ASTABLE_METADATA_FILES = $(addsuffix Full.bridgesupport,$(addprefix $(STABLE_GEN_DIR)/,$(FRAMEWORKS)))
4632N/A
4632N/A# source files
4632N/ACORE_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.hs" -or -name "*.java" -or -name "*.m" -or -name "*.h" -print)
4632N/AGENERATOR_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -print)
4632N/AADDITIONS_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -or -name "*.m" -or -name "*.h" -print)
4632N/ABUILD_SRC = $(SRCDIR)/JObjC.xcodeproj/project.pbxproj $(SRCDIR)/bridgesupport.gmk $(SRCDIR)/build.xml $(SRCDIR)/extract_classes.pl $(SRCDIR)/run-and-write-if-okay $(SRCDIR)/rungen $(SRCDIR)/runjava
4632N/A
4632N/A# jobjc products for jdk
4632N/ABUILT_DYLIB = $(OUTPUTDIR)/JObjC.dst/Debug/libJObjC.dylib
4632N/ABUILT_JAR = $(OUTPUTDIR)/JObjC.build/JObjC.jar
4632N/A
4632N/A$(GEN_DIR):
4632N/A mkdir -p $(GEN_DIR)
4632N/A
4632N/Astabilize: $(GEN_DIR)
4632N/A @echo Updating bridge support in $(GEN_DIR)
4632N/A ($(CD) $(GEN_DIR); $(MAKE) STABLE_GEN_DIR="$(STABLE_GEN_DIR)" FRAMEWORKS="$(FRAMEWORKS)" -f $(SRCDIR)/bridgesupport.gmk all)
4632N/A
4632N/A$(STABLE_METADATA_FILES): stabilize
4632N/A
4797N/AABS_OUTPUTDIR=$(realpath $(OUTPUTDIR))
4797N/AABS_STABLE_GEN_DIR=$(realpath $(STABLE_GEN_DIR))
4797N/A
4632N/A$(BUILT_DYLIB) $(BUILT_JAR): $(STABLE_METADATA_FILES) $(CORE_SRC) $(GENERATOR_SRC) $(ADDITIONS_SRC) $(BUILD_SRC)
4632N/A @echo JObjC dylib or jar out of data wrt FRAMEWORKS '(' $(FRAMEWORKS) ')' or JObjC source '(' core, generator, additions, build ')'
4632N/A @echo Running ant with java_home set to ${ALT_BOOTDIR}
4797N/A (cd $(SRCDIR); OBJROOT="$(ABS_OUTPUTDIR)/JObjC.build" DSTROOT="$(ABS_OUTPUTDIR)/JObjC.dst" JAVA_HOME=${ALT_BOOTDIR} STABLE_GEN_DIR="$(ABS_STABLE_GEN_DIR)" /usr/bin/ant -verbose all)
4632N/A
4632N/Aall: $(BUILD_DYLIB) $(BUILT_JAR)
4632N/A $(CP) $(BUILT_DYLIB) $(LIB_LOCATION)/libJObjC.dylib
4632N/A
4632N/Aclean clobber::
4632N/A (cd $(SRCDIR); export OBJROOT=$(OUTPUTDIR)/JObjC.build; export DSTROOT=$(OUTPUTDIR)/JObjC.dst; /usr/bin/ant clean)
4632N/A
4632N/Aendif