--- src/native/Makefile.orig 2003-01-07 10:14:35 UTC +++ src/native/Makefile @@ -38,25 +38,31 @@ ifeq (MSC,$(WIN32)) INCLUDES = -I "c:/Programme/DevStudio/VC/include" \ -I $(JAVAINCLUDE) -I $(JAVANATINC) LIB = "c:/Programme/DevStudio/VC/lib" -CC = cl +#CC = gcc OBJ_EXT := obj LIB_PRE := LIB_EXT := dll CFLAGS=-DWIN32=$(WIN32) -D__IBMC__ else -INCLUDES = -I $(JAVAINCLUDE) -I $(JAVANATINC) -LIBPATH = -L/usr/lib/termcap -JavaReadline_LIBS = -lreadline -ltermcap -lhistory -JavaEditline_LIBS = -ledit -ltermcap +INCLUDES = -I $(JAVAINCLUDE) -I $(JAVANATINC) -I $(LOCALBASE)/include +ifeq (JavaEditline,$(TG)) +LIBPATH = -L$(LOCALBASE)/lib -rpath $(LOCALBASE)/lib +endif +ifeq (JavaReadline,$(TG)) +LIBPATH = -L$(LOCALBASE)/lib -rpath $(LOCALBASE)/lib +endif +JavaReadline_LIBS = -lreadline -lncurses -lhistory +JavaEditline_LIBS = $(LOCALBASE)/lib/libedit.so -lncurses ifeq (cygwin,$(WIN32)) JavaGetline_LIBS = -lcygwin endif -CC = gcc +CC = cc OBJ_EXT := o LIB_PRE := lib LIB_EXT := so -CFLAGS=-fPIC -DPOSIX +CFLAGS+=-fPIC -DPOSIX endif +JAVAH ?= javah OBJECTS := org_gnu_readline_Readline.$(OBJ_EXT) @@ -69,13 +75,13 @@ all: $(T_LIBS) lib: $(ROOTDIR)/$(LIB_PRE)$(TG).$(LIB_EXT) JavaReadline: - make TG=$@ lib + $(MAKE) TG=$@ lib JavaEditline: - make TG=$@ lib + $(MAKE) TG=$@ lib JavaGetline: - make TG=$@ lib + $(MAKE) TG=$@ lib $(ROOTDIR)/$(LIB_PRE)$(TG).$(LIB_EXT): $(OBJECTS) ifeq (MSC,$(WIN32)) @@ -110,7 +116,7 @@ org_gnu_readline_Readline.$(OBJ_EXT): or -c org_gnu_readline_Readline.c org_gnu_readline_Readline.h: $(BUILDDIR)/org/gnu/readline/Readline.class - javah -classpath $(BUILDDIR) -jni org.gnu.readline.Readline + $(JAVAH) -classpath $(BUILDDIR) -jni org.gnu.readline.Readline touch org_gnu_readline_Readline.h clean: