1 # 2 # Copyright (c) 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 BUILDDIR = ../.. 27 LIBRARY = osxapp 28 PRODUCT = sun 29 include $(BUILDDIR)/common/Defs.gmk 30 31 GEN_DIR=$(GENSRCDIR)/sun/osxapp 32 ICON_DATA = $(GEN_DIR)/AWTIconData.h 33 34 CLASSES_INIT += $(ICON_DATA) 35 36 # 37 # Files 38 # 39 FILES_objc = \ 40 NSApplicationAWT.m \ 41 QueuingApplicationDelegate.m \ 42 PropertiesUtilities.m \ 43 ThreadUtilities.m 44 45 # 46 # Rules. 47 # 48 include $(BUILDDIR)/common/Library.gmk 49 50 # 51 # Add to the ambient vpath to pick up files in subdirectories 52 # 53 vpath %.m $(call NativeSrcDirList,,native/sun/osxapp) 54 55 # TODO: perhaps not all of the below frameworks are required 56 OTHER_LDLIBS += \ 57 -framework Accelerate \ 58 -framework ApplicationServices \ 59 -framework AudioToolbox \ 60 -framework Carbon \ 61 -framework Cocoa \ 62 -framework Security \ 63 -framework ExceptionHandling \ 64 -framework JavaNativeFoundation \ 65 -framework JavaRuntimeSupport \ 66 -framework OpenGL \ 67 -framework IOSurface \ 68 -framework QuartzCore 69 70 CPPFLAGS += \ 71 -I$(GEN_DIR) \ 72 $(call NativeSrcDirList,-I,/native/sun/osxapp) 73 74 75 ifeq ($(MILESTONE), internal) 76 CPPFLAGS += -DINTERNAL_BUILD 77 endif 78 79 TEMPDIR_CLASSES = $(TEMPDIR)/classes 80 81 $(TEMPDIR_CLASSES)/sun/osxapp/ToBin.class: ToBin.java 82 @$(prep-target) 83 $(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $< 84 85 86 ICONPATH=$(PLATFORM_SRC_MACOS)/native/sun/osxapp/resource/icons 87 ICON = $(ICONPATH)/JavaApp.icns 88 89 $(GEN_DIR)/AWTIconData.h: $(TEMPDIR_CLASSES)/sun/osxapp/ToBin.class $(ICON) 90 $(prep-target) 91 $(RM) $(ICON_DATA) 92 $(ECHO) "static unsigned char sAWTIconData[] = { " >> $(ICON_DATA); \ 93 $(CAT) $(ICON) | \ 94 $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) -Djava.awt.headless=true \ 95 sun.osxapp.ToBin >> $(ICON_DATA); \ 96 $(ECHO) "};" >> $(ICON_DATA); 97 98 99 clean clobber:: 100 101 .PHONY: