# # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is The Waterfall Java Plugin Module # # The Initial Developer of the Original Code is Sun Microsystems Inc # Portions created by Sun Microsystems Inc are Copyright (C) 2001 # All Rights Reserved. # # $Id: Defs.gmk,v 1.2 2001-07-12 19:57:39 edburns%acm.org Exp $ # # Contributor(s): # # Nikolay N. Igotti # BUILDDIR=. ROOTDIR=../.. MAKE = gmake CXX = g++ -Wall -Wno-long-long CC = gcc -pedantic -Wall -Wno-long-long LD = gcc CCOPT = -g CP = cp TAR = tar ECHO = echo # type of really used JVM # values: _JVMP_IBMJVM, _JVMP_SUNJVM #JVMTYPE = _JVMP_IBMJVM JVMTYPE = _JVMP_SUNJVM # use hotspot for older 1.3 and client for 1.3.1 and 1.4 #JVMKIND = hotspot #JVMKIND = classic JVMKIND = client # using pthreads, should be defined by smth like configure THREADTYPE = _JVMP_PTHREADS # use shared memory and 2 process approach USE_SHM = 0 # set to 1 if you want to compile pJava-compatible WF WF_PJAVA = 0 uname = $(shell uname) ifeq ($(uname), SunOS) PLATFORM = solaris endif ifeq ($(uname), Linux) PLATFORM = linux endif archExpr = case "`uname -m`" in \ i[3-6]86) \ echo i386 \ ;; \ i86pc) \ echo i386 \ ;; \ sparc*) \ echo sparc \ ;; \ sun4u) \ echo sparc \ ;; \ *) \ uname -m \ ;; \ esac ARCH = $(shell $(archExpr) ) CCDEBUG = PICFLAGS = -fPIC -DPIC INCLUDES = -I$(ROOTDIR)/include -I$(ROOTDIR)/include/$(PLATFORM) -I../../public -I../../public/$(PLATFORM) -I$(WFJDKHOME)/include -I$(WFJDKHOME)/include/$(PLATFORM) EXTRA_CFLAGS = $(CCOPT) $(CCDEBUG) CFLAGS = -D_REENTRANT $(PICFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) -D$(JVMTYPE) -D$(THREADTYPE) -DXP_UNIX -D_GNU_SOURCE -D_JVMP_IMPLEMENTATION LIBFLAGS = -shared $(CCDEBUG) ifeq ($(PLATFORM),linux) CFLAGS += -rdynamic XLIBS= -L/usr/X11R6/lib -lXt PLUGINLIBS=-ldl HOSTLIBS= -ldl -lpthread $(GTKLIBS) INCLUDES += -I/usr/X11R6/include CXXFLAGS= endif ifeq ($(PLATFORM),solaris) XLIBS= -L/usr/openwin/lib -lXt PLUGINLIBS=-ldl -lthread HOSTLIBS= -ldl -lthread $(GTKLIBS) INCLUDES += -I/usr/openwin/include CXXFLAGS= -fpermissive endif GTKLIBS = $(shell gtk-config --libs) GTKCFLAGS = $(shell gtk-config --cflags) CFLAGS += -DARCH="\"$(ARCH)\"" -DJVMKIND="\"$(JVMKIND)\"" -DPLATFORM="\"$(PLATFORM)\"" CXXFLAGS += $(GTKCFLAGS) $(INCLUDES) -DXP_UNIX ifeq ($(USE_SHM), 1) CFLAGS += -DJVMP_USE_SHM else PLUGINLIBS+=-lpthread endif ifeq ($(WF_PJAVA), 1) CFLAGS += -DWF_PJAVA endif