1#******************************************************************************* 2# Copyright (c) 2000, 2012 IBM Corporation and others. 3# 4# This program and the accompanying materials 5# are made available under the terms of the Eclipse Public License 2.0 6# which accompanies this distribution, and is available at 7# https://www.eclipse.org/legal/epl-2.0/ 8# 9# SPDX-License-Identifier: EPL-2.0 10# 11# Contributors: 12# IBM Corporation - initial API and implementation 13#******************************************************************************* 14 15# Makefile for SWT libraries on Cocoa/Mac 16 17include make_common.mak 18 19SWT_PREFIX=swt 20SWTPI_PREFIX=swt-pi 21WS_PREFIX=cocoa 22SWT_VERSION=$(maj_ver)$(min_ver)r$(rev) 23SWT_LIB=lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).jnilib 24SWTPI_LIB=lib$(SWTPI_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).jnilib 25 26AWT_PREFIX = swt-awt 27AWT_LIB = lib$(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).jnilib 28AWT_OBJECTS = swt_awt.o 29 30# Uncomment for Native Stats tool 31#NATIVE_STATS = -DNATIVE_STATS 32 33#SWT_DEBUG = -g 34CFLAGS = -c -xobjective-c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCOCOA -DATOMIC \ 35 $(CFLAGS_JAVA_VM) \ 36 -I /System/Library/Frameworks/Cocoa.framework/Headers \ 37 -I /System/Library/Frameworks/JavaScriptCore.framework/Headers 38LFLAGS = -bundle $(ARCHS) -framework Cocoa -framework WebKit -framework CoreServices -framework JavaScriptCore -framework Security -framework SecurityInterface 39SWT_OBJECTS = swt.o c.o c_stats.o callback.o 40SWTPI_OBJECTS = swt.o os.o os_structs.o os_stats.o os_custom.o 41 42all: $(SWT_LIB) $(SWTPI_LIB) $(AWT_LIB) 43 44.c.o: 45 cc $(CFLAGS) $*.c 46 47$(AWT_LIB): $(AWT_OBJECTS) 48 cc -o $(AWT_LIB) $(LFLAGS) $(AWT_OBJECTS) 49 50$(SWT_LIB): $(SWT_OBJECTS) 51 cc -o $(SWT_LIB) $(LFLAGS) $(SWT_OBJECTS) 52 53$(SWTPI_LIB): $(SWTPI_OBJECTS) 54 cc -o $(SWTPI_LIB) $(LFLAGS) $(SWTPI_OBJECTS) 55 56install: all 57 cp *.jnilib $(OUTPUT_DIR) 58 59clean: 60 rm -f *.jnilib *.o 61