Build working on Linux.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@171 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/jni/linux/Makefile b/jni/linux/Makefile
index 35b88fe..c4a41c7 100644
--- a/jni/linux/Makefile
+++ b/jni/linux/Makefile
@@ -1,20 +1,26 @@
+# Copyright 2006 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
# Copyright 2006 Google Inc. All Rights Reserved.
#
-#-------------------------------------------------------------------------------
-# Macros
-#-------------------------------------------------------------------------------
-SHELL = /bin/sh
##
# Target settings
##
-ROOTDIR = ./
-PLATFORM:= linux
-PROGNAME:= gwt-ll
-PROG := lib$(PROGNAME).so
-PROGDIR := ./
-OBJDIR := $(PROGDIR)objs/
-OUT := $(PROGDIR)image/$(PROG)
+GWT_ROOT = ../../
+OBJDIR := $(GWT_ROOT)build/out/jni/linux/
+OUTDIR := $(GWT_ROOT)build/jni/linux/
+OUT := $(OUTDIR)libgwt-ll.so
##
# Tools
@@ -27,8 +33,8 @@
##
# List of source, object, and dependency paths plus the path to them
##
-SRCDIRS := ./:../gwt-ll-core/
-VPATH := .:../gwt-ll-core
+SRCDIRS := ./:../core/
+VPATH := .:../core
SRCS := gwt-ll.cpp Moz.cpp
OBJS := $(addprefix $(OBJDIR),$(SRCS:.cpp=.o))
DEPS := $(addprefix $(OBJDIR),$(SRCS:.cpp=.d))
@@ -37,10 +43,10 @@
# Include path configuration
##
SYSINCS := \
- $(ROOTDIR)../../third_party/j2sdk1.4.2_09/include \
- $(ROOTDIR)../../third_party/j2sdk1.4.2_09/include/$(PLATFORM) \
- $(ROOTDIR)../../third_party/gecko-sdk-linux/include \
- $(ROOTDIR)../../third_party/gecko-sdk-linux/include/extra
+ $(JAVA_HOME)/include \
+ $(JAVA_HOME)/include/linux \
+ $(GWT_TOOLS)/sdk/mozilla-1.7.12/include \
+ $(GWT_TOOLS)/sdk/mozilla-1.7.12/include/extra
INCS := $(addprefix -i ,$(INCS)) $(addprefix -isystem ,$(SYSINCS))
@@ -48,7 +54,7 @@
# Libraries and library path
##
LIBS = xpcomglue_s
-LIBPATH = -L../../third_party/gecko-sdk-linux/lib
+LIBPATH = -L$(GWT_TOOLS)/sdk/mozilla-1.7.12/lib
LIBS := $(addprefix -l,$(LIBS))
# for notes on auto-dependency generation, see
@@ -57,12 +63,6 @@
CFLAGS := -Os -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -D_REENTRANT -c -MMD -MP -Wno-system-headers $(CFLAGS)
LDFLAGS := -s -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -D_REENTRANT -Wl,-shared-gcc $(LDFLAGS)
-##
-# Clean macros
-##
-CLEANDIRS := $(CLEANDIRS) $(OBJDIR)
-CLEANFILES := $(CLEANFILES) $(OUT)
-
#-------------------------------------------------------------------------------
# Rules
#-------------------------------------------------------------------------------
@@ -88,8 +88,7 @@
# Actual output file
##
$(OUT): $(OBJS)
- @[ -d $(PROGDIR) ] || mkdir -p $(PROGDIR)
- @[ -d $(PROGDIR)image ] || mkdir -p $(PROGDIR)image
+ @[ -d $(OUTDIR) ] || mkdir -p $(OUTDIR)
$(LD) -shared $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
$(STRIP) --strip-unneeded $@
@@ -97,5 +96,4 @@
# Clean rule
##
clean:
- @-rm -f $(CLEANFILES)
- @-rm -rf $(CLEANDIRS)
+ @-rm -rf $(OBJDIR) $(OUT)