author | alanb |
Fri, 02 Nov 2012 15:50:11 +0000 | |
changeset 14342 | 8435a30053c1 |
parent 13829 | 9da0d8f01a5a |
permissions | -rw-r--r-- |
12047 | 1 |
# |
14342
8435a30053c1
7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents:
13829
diff
changeset
|
2 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
12047 | 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 |
# |
|
27 |
# Makefile for building jobjc |
|
28 |
||
29 |
BUILDDIR = ../.. |
|
30 |
include $(BUILDDIR)/common/Defs.gmk |
|
31 |
SRCDIR = $(JDK_TOPDIR)/src/macosx/native/jobjc |
|
32 |
||
33 |
ifeq ($(PLATFORM),macosx) |
|
34 |
||
35 |
# FRAMEWORKS for which we want to build bridge support |
|
36 |
FRAMEWORKS = Foundation CoreFoundation AppKit |
|
37 |
||
38 |
# metadata stuff |
|
39 |
GEN_DIR = $(OUTPUTDIR)/bridge_metadata |
|
40 |
STABLE_GEN_DIR = $(OUTPUTDIR)/stable_bridge_metadata |
|
41 |
STABLE_METADATA_FILES = $(addsuffix Full.bridgesupport,$(addprefix $(STABLE_GEN_DIR)/,$(FRAMEWORKS))) |
|
42 |
||
43 |
# source files |
|
44 |
CORE_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.hs" -or -name "*.java" -or -name "*.m" -or -name "*.h" -print) |
|
45 |
GENERATOR_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -print) |
|
46 |
ADDITIONS_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -or -name "*.m" -or -name "*.h" -print) |
|
47 |
BUILD_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 |
|
48 |
||
49 |
# jobjc products for jdk |
|
50 |
BUILT_DYLIB = $(OUTPUTDIR)/JObjC.dst/Debug/libJObjC.dylib |
|
51 |
BUILT_JAR = $(OUTPUTDIR)/JObjC.build/JObjC.jar |
|
52 |
||
53 |
$(GEN_DIR): |
|
54 |
mkdir -p $(GEN_DIR) |
|
55 |
||
56 |
stabilize: $(GEN_DIR) |
|
57 |
@echo Updating bridge support in $(GEN_DIR) |
|
58 |
($(CD) $(GEN_DIR); $(MAKE) STABLE_GEN_DIR="$(STABLE_GEN_DIR)" FRAMEWORKS="$(FRAMEWORKS)" -f $(SRCDIR)/bridgesupport.gmk all) |
|
59 |
||
60 |
$(STABLE_METADATA_FILES): stabilize |
|
61 |
||
62 |
ABS_OUTPUTDIR=$(realpath $(OUTPUTDIR)) |
|
63 |
ABS_STABLE_GEN_DIR=$(realpath $(STABLE_GEN_DIR)) |
|
64 |
||
13829 | 65 |
# How to run ant |
66 |
ifdef LANGTOOLS_DIST |
|
67 |
ANT_CMD = $(ANT) |
|
68 |
else |
|
69 |
ANT_CMD = $(ANT_WITH_IMPORT) |
|
70 |
endif |
|
71 |
||
12047 | 72 |
$(BUILT_DYLIB) $(BUILT_JAR): $(STABLE_METADATA_FILES) $(CORE_SRC) $(GENERATOR_SRC) $(ADDITIONS_SRC) $(BUILD_SRC) |
73 |
@echo JObjC dylib or jar out of data wrt FRAMEWORKS '(' $(FRAMEWORKS) ')' or JObjC source '(' core, generator, additions, build ')' |
|
74 |
@echo Running ant with java_home set to ${ALT_BOOTDIR} |
|
13829 | 75 |
(cd $(SRCDIR); OBJROOT="$(ABS_OUTPUTDIR)/JObjC.build" DSTROOT="$(ABS_OUTPUTDIR)/JObjC.dst" JAVA_HOME=${ALT_BOOTDIR} STABLE_GEN_DIR="$(ABS_STABLE_GEN_DIR)" $(ANT_CMD) -verbose all) |
12047 | 76 |
|
77 |
all: $(BUILD_DYLIB) $(BUILT_JAR) |
|
78 |
$(CP) $(BUILT_DYLIB) $(LIB_LOCATION)/libJObjC.dylib |
|
79 |
||
80 |
clean clobber:: |
|
13829 | 81 |
(cd $(SRCDIR); export OBJROOT=$(OUTPUTDIR)/JObjC.build; export DSTROOT=$(OUTPUTDIR)/JObjC.dst; $(ANT_CMD) clean) |
12047 | 82 |
|
83 |
endif |