Let's roll back my last change to Unsafe and do this differently; my shared

object compiled on my laptop that I checked in blows up on my desktop. Yay
for worrying about where you compile. So instead, because we only needed to
call init() to setup jvmpi for garbage collection, only call that if we
touch that functionality so we can keep the same old compiled code kicking
around, nobody that consumes this needs to change things, etc.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@401 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2008-01-18 19:49:48 +00:00
parent 611098c7d6
commit bed5271a28
15 changed files with 131 additions and 262 deletions
@@ -21,32 +21,24 @@ INSTALL_PATH=${ROOT}/dist/lib/i686-Linux
INCLUDES=-I.. -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux
LIBRARIES=-lX11
TARGETS=libunsafe.so libunsafegc.so
TARGET=libunsafe.so
#
# Target definitions
all: ${TARGETS}
all: ${TARGET}
install:
@${MKDIR} -p ${INSTALL_PATH}
cp ${TARGETS} ${INSTALL_PATH}
cp ${TARGET} ${INSTALL_PATH}
libunsafe.so: com_threerings_util_unsafe_Unsafe.c
@echo "Compiling $<"
${TARGET}: com_threerings_util_unsafe_Unsafe.c
@echo Compiling Unsafe.c
@${CC} ${INCLUDES} -c com_threerings_util_unsafe_Unsafe.c \
-o com_threerings_util_unsafe_Unsafe.o
@echo "Creating $@"
@${CC} -o libunsafe.so com_threerings_util_unsafe_Unsafe.o \
${LIBRARIES} ${LIBRARIES_PATH} -shared
libunsafegc.so: com_threerings_util_unsafe_UnsafeGC.c
@echo "Compiling $<"
@${CC} ${INCLUDES} -c com_threerings_util_unsafe_UnsafeGC.c \
-o com_threerings_util_unsafe_UnsafeGC.o
@echo "Creating $@"
@${CC} -o libunsafegc.so com_threerings_util_unsafe_UnsafeGC.o \
@echo Creating ${TARGET}
@${CC} -o ${TARGET} com_threerings_util_unsafe_Unsafe.o \
${LIBRARIES} ${LIBRARIES_PATH} -shared
clean:
-${RM} -f *.o ${TARGETS}
-${RM} -f *.o ${TARGET}