1# Copyright (c) 2006, 2007, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19# or visit www.oracle.com if you need additional information or have any
20# 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#
35PLATFORM=solaris
36ARCH=sparc
37OUTPUT_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#
46CC=/java/devtools/$(ARCH)/SUNWspro/SS11/bin/cc
47
48#
49# Include directory in JRE or JDK install
50#
51JINCLUDE=/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#
58ifeq ($(PLATFORM), solaris)
59	PLATFORM_LIBS= -lthread
60else
61	PLATFORM_LIBS=
62endif
63
64#
65# Targets
66#
67all: install
68
69$(PLATFORM):
70	mkdir $(OUTPUT_DIR) $(OUTPUT_DIR)/SCCS
71
72install: $(PLATFORM)
73	$(CC) -I$(JINCLUDE) -I$(JINCLUDE)/$(PLATFORM) \
74		-o $(OUTPUT_DIR)/launcher launcher.c $(PLATFORM_LIBS) -ldl
75
76clean:
77
78
79clobber: clean
80	rm $(OUTPUT_DIR)/launcher
81