Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2003-01-31 15:00:25 -0500
committerAlain Magloire2003-01-31 15:00:25 -0500
commit737909c87881add4fbcb58d62e14f1f9475f9183 (patch)
tree336a8399cf6c94495eed6f86986024189f62edb5 /core/org.eclipse.cdt.core.linux/library
parentef31e08d7049733a6a89897cbc6d9f9c37a8b700 (diff)
downloadorg.eclipse.cdt-737909c87881add4fbcb58d62e14f1f9475f9183.tar.gz
org.eclipse.cdt-737909c87881add4fbcb58d62e14f1f9475f9183.tar.xz
org.eclipse.cdt-737909c87881add4fbcb58d62e14f1f9475f9183.zip
patch from Tom Tromey.
Diffstat (limited to 'core/org.eclipse.cdt.core.linux/library')
-rw-r--r--core/org.eclipse.cdt.core.linux/library/Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/core/org.eclipse.cdt.core.linux/library/Makefile b/core/org.eclipse.cdt.core.linux/library/Makefile
index 4318834f0eb..8b5010ac532 100644
--- a/core/org.eclipse.cdt.core.linux/library/Makefile
+++ b/core/org.eclipse.cdt.core.linux/library/Makefile
@@ -1,29 +1,28 @@
# makefile for libspawner.so
-# set JDK_INCLUDES if they are not already set in the environment
-# spit out a warning if the make script will be using the default values
-ifeq ($(JDK_INCLUDES),)
-$(warning JDK_INCLUDES not set in environment, using default: $(JDK_INCLUDES))
-endif
-
-ifeq ($(JDK_OS_INCLUDES),)
-$(warning JDK_OS_INCLUDES not set in environment, using default: $(JDK_OS_INCLUDES))
+ifeq ($(JAVA_HOME),)
+$(warning JAVA_HOME not set in environment)
endif
+# Defaults which can be overridden.
+OS = linux
+ARCH = x86
-JDK_INCLUDES=/usr/local/jdk/include
-JDK_OS_INCLUDES=/usr/local/jdk/include/linux
+JDK_INCLUDES= $(JAVA_HOME)/include
+JDK_OS_INCLUDES= $(JAVA_HOME)/include/$(OS)
CC=gcc
CPPFLAGS = -I. -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
CFLAGS +=-fpic -D_REENTRANT
+INSTALL_DIR = ../os/$(OS)/$(ARCH)
+
LIB_NAME_SPAWNER = libspawner.so
-LIB_NAME_FULL_SPAWNER = ../os/linux/x86/libspawner.so
+LIB_NAME_FULL_SPAWNER = $(INSTALL_DIR)/libspawner.so
OBJS_SPAWNER=spawner.o io.o exec_unix.o pfind.o
LIB_NAME_PTY = libpty.so
-LIB_NAME_FULL_PTY = ../os/linux/x86/libpty.so
+LIB_NAME_FULL_PTY = $(INSTALL_DIR)/libpty.so
OBJS_PTY= openpty.o pty.o ptyio.o
OBJS = $(OBJS_SPAWNER) $(OBJS_PTY)
@@ -33,9 +32,11 @@ all: $(LIB_NAME_FULL_SPAWNER) $(LIB_NAME_FULL_PTY)
rebuild: clean all
$(LIB_NAME_FULL_SPAWNER) : $(OBJS_SPAWNER)
+ mkdir -p $(INSTALL_DIR)
$(CC) -g -shared -Wl,-soname,$(LIB_NAME_SPAWNER) -o $(LIB_NAME_FULL_SPAWNER) $(OBJS_SPAWNER) -lc
$(LIB_NAME_FULL_PTY): $(OBJS_PTY)
+ mkdir -p $(INSTALL_DIR)
$(CC) -g -shared -Wl,-soname,$(LIB_NAME_PTY) -o $(LIB_NAME_FULL_PTY) $(OBJS_PTY)
clean :

Back to the top