18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# This code is free software; you can redistribute it and/or modify it
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# under the terms of the GNU General Public License version 2 only, as
ae7c44f85e4d160f633af16b1c85da812de7052cMilan Jurik# published by the Free Software Foundation. Oracle designates this
44faeccf479dbc70538c261f148f9ad6a8b5ed31artem# particular file as subject to the "Classpath" exception as provided
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# by Oracle in the LICENSE file that accompanied this code.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# This code is distributed in the hope that it will be useful, but WITHOUT
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# version 2 for more details (a copy is included in the LICENSE file that
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# accompanied this code).
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# You should have received a copy of the GNU General Public License version
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# 2 along with this work; if not, write to the Free Software Foundation,
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# or visit www.oracle.com if you need additional information or have any
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# questions.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Makefile for building jobjc
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# FRAMEWORKS for which we want to build bridge support
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# metadata stuff
18c2aff776a775d34a4c9893a4c72e0434d68e36artemSTABLE_METADATA_FILES = $(addsuffix Full.bridgesupport,$(addprefix $(STABLE_GEN_DIR)/,$(FRAMEWORKS)))
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# source files
18c2aff776a775d34a4c9893a4c72e0434d68e36artemCORE_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.hs" -or -name "*.java" -or -name "*.m" -or -name "*.h" -print)
18c2aff776a775d34a4c9893a4c72e0434d68e36artemGENERATOR_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -print)
18c2aff776a775d34a4c9893a4c72e0434d68e36artemADDITIONS_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -or -name "*.m" -or -name "*.h" -print)
18c2aff776a775d34a4c9893a4c72e0434d68e36artemBUILD_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
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# jobjc products for jdk
18c2aff776a775d34a4c9893a4c72e0434d68e36artemBUILT_DYLIB = $(OUTPUTDIR)/JObjC.dst/Debug/libJObjC.dylib
44faeccf479dbc70538c261f148f9ad6a8b5ed31artem ($(CD) $(GEN_DIR); $(MAKE) STABLE_GEN_DIR="$(STABLE_GEN_DIR)" FRAMEWORKS="$(FRAMEWORKS)" -f $(SRCDIR)/bridgesupport.gmk all)
44faeccf479dbc70538c261f148f9ad6a8b5ed31artem$(BUILT_DYLIB) $(BUILT_JAR): $(STABLE_METADATA_FILES) $(CORE_SRC) $(GENERATOR_SRC) $(ADDITIONS_SRC) $(BUILD_SRC)
44faeccf479dbc70538c261f148f9ad6a8b5ed31artem @echo JObjC dylib or jar out of data wrt FRAMEWORKS '(' $(FRAMEWORKS) ')' or JObjC source '(' core, generator, additions, build ')'
44faeccf479dbc70538c261f148f9ad6a8b5ed31artem @echo Running ant with java_home set to ${ALT_BOOTDIR}
44faeccf479dbc70538c261f148f9ad6a8b5ed31artem (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)