J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | # Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. |
| 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 3 | # |
| 4 | # This code is free software; you can redistribute it and/or modify it |
| 5 | # under the terms of the GNU General Public License version 2 only, as |
| 6 | # published by the Free Software Foundation. |
| 7 | # |
| 8 | # This code is distributed in the hope that it will be useful, but WITHOUT |
| 9 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 10 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 11 | # version 2 for more details (a copy is included in the LICENSE file that |
| 12 | # accompanied this code). |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License version |
| 15 | # 2 along with this work; if not, write to the Free Software Foundation, |
| 16 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 17 | # |
| 18 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 19 | # CA 95054 USA or visit www.sun.com if you need additional information or |
| 20 | # have any questions. |
| 21 | |
| 22 | # |
| 23 | # This Makefile is used to generate versions of the launcher program for |
| 24 | # use by the CustomLauncherTest. The binaries are checked into SCCS |
| 25 | # so this Makefile is not used as part of test run. It is provided to |
| 26 | # make rebuilding the launcher binaries a relatively painless activity. |
| 27 | # |
| 28 | |
| 29 | # |
| 30 | # Edit the following to reflect the current build environment. |
| 31 | # |
| 32 | # Architecture being built (initially one of: solaris-sparc, solaris-i586, |
| 33 | # linux-i586. |
| 34 | # |
| 35 | PLATFORM=solaris |
| 36 | ARCH=sparc |
| 37 | OUTPUT_DIR =$(PLATFORM)-$(ARCH) |
| 38 | |
| 39 | # |
| 40 | # Path to C compiler |
| 41 | # |
| 42 | # As of 6/1/06: |
| 43 | # Solaris CC=/java/devtools/$(ARCH)/SUNWspro/SS11/bin/cc |
| 44 | # Linux CC=/usr/bin/gcc |
| 45 | # |
| 46 | CC=/java/devtools/$(ARCH)/SUNWspro/SS11/bin/cc |
| 47 | |
| 48 | # |
| 49 | # Include directory in JRE or JDK install |
| 50 | # |
| 51 | JINCLUDE=/java/re/jdk/1.6.0/latest/binaries/$(OUTPUT_DIR)/include |
| 52 | |
| 53 | # |
| 54 | # PLATFORM dependent flags |
| 55 | # |
| 56 | # On pre-Solaris 10, -lthread is required. |
| 57 | # |
| 58 | ifeq ($(PLATFORM), solaris) |
| 59 | PLATFORM_LIBS= -lthread |
| 60 | else |
| 61 | PLATFORM_LIBS= |
| 62 | endif |
| 63 | |
| 64 | # |
| 65 | # Targets |
| 66 | # |
| 67 | all: install |
| 68 | |
| 69 | $(PLATFORM): |
| 70 | mkdir $(OUTPUT_DIR) $(OUTPUT_DIR)/SCCS |
| 71 | |
| 72 | install: $(PLATFORM) |
| 73 | $(CC) -I$(JINCLUDE) -I$(JINCLUDE)/$(PLATFORM) \ |
| 74 | -o $(OUTPUT_DIR)/launcher launcher.c $(PLATFORM_LIBS) -ldl |
| 75 | |
| 76 | clean: |
| 77 | |
| 78 | |
| 79 | clobber: clean |
| 80 | rm $(OUTPUT_DIR)/launcher |