--- makefile.orig Fri Sep 30 13:30:14 2005 +++ makefile Mon Oct 3 15:26:07 2005 @@ -33,11 +33,11 @@ SUFF= else ifneq (,$(findstring FreeBSD,$(OSTYPE))) -TFLAGS=-pthread -THRLIBS= +TFLAGS=-D_REENTRANT ${PTHREAD_CFLAGS} +THRLIBS=${PTHREAD_LIBS} else -TFLAGS=-D_REENTRANT -D_THREAD_SAFE -THRLIBS=-lpthread +TFLAGS=-D_REENTRANT ${PTHREAD_CFLAGS} +THRLIBS=${PTHREAD_LIBS} endif SUFF=_r endif @@ -67,21 +67,21 @@ WEB_EXAMPLES = cgistub bugdb clidb -CC = g++ +CC = ${CXX} # DEFS macro is deprecatred, edit config.h file instead DEFS = #CFLAGS = $(TFLAGS) -Iinc -c -Wall -O5 -g -fPIC $(DEFS) -CFLAGS = -c -Iinc -Wall -O0 -g -fPIC $(DEFS) $(TFLAGS) +CFLAGS = -c -Iinc ${CXXFLAGS} $(DEFS) $(TFLAGS) -fPIC #CFLAGS = -c -Iinc -Wall -O0 -fPIC -DFASTDB_DEBUG=DEBUG_TRACE -g $(DEFS) $(TFLAGS) -#SHFLAGS=-shared -Wl,-soname,$@ -SHFLAGS=-shared +SHFLAGS=-shared -Wl,-soname,$@ +#SHFLAGS=-shared LD = $(CC) -LDFLAGS = -g $(TFLAGS) +LDFLAGS = $(TFLAGS) AR = ar ARFLAGS = -cru @@ -352,23 +352,21 @@ install: subsql cleanupsem installlib mkdir -p $(BINSPATH) - cp subsql $(BINSPATH) - strip $(BINSPATH)/subsql - cp cleanupsem $(BINSPATH) - strip $(BINSPATH)/cleanupsem + ${BSD_INSTALL_PROGRAM} subsql $(BINSPATH) + ${BSD_INSTALL_PROGRAM} cleanupsem $(BINSPATH) installlib: $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) mkdir -p $(INCSPATH) - cp $(INCS) $(INCSPATH) + ${BSD_INSTALL_DATA} $(INCS) $(INCSPATH) mkdir -p $(LIBSPATH) - cp $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) $(JNI_LIB) $(LIBSPATH) + ${BSD_INSTALL_PROGRAM} $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) $(LIBSPATH) ln -f -s $(LIBSPATH)/$(FASTDB_SHARED) $(LIBSPATH)/libfastdb$(SUFF).so ln -f -s $(LIBSPATH)/$(CLI_SHARED) $(LIBSPATH)/libcli$(SUFF).so - ln -f -s $(LIBSPATH)/$(JNI_LIB) $(LIBSPATH)/libjnicli$(SUFF).so +# ln -f -s $(LIBSPATH)/$(JNI_LIB) $(LIBSPATH)/libjnicli$(SUFF).so uninstall: rm -fr $(INCSPATH) - cd $(LIBSPATH); rm -f $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) $(JNI_LIB) libfastdb$(SUFF).so libjnicli$(SUFF).so libcli$(SUFF).so + cd $(LIBSPATH); rm -f $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) libfastdb$(SUFF).so libcli$(SUFF).so rm $(BINSPATH)/subsql cleanobj: