Author: rjung Date: Thu Aug 2 09:54:20 2007 New Revision: 562182 URL: http://svn.apache.org/viewvc?view=rev&rev=562182 Log: Improve nsapi Makefiles a bit: - remove unnecessary differences between Solaris and Linux - Use CC and CFLAGS Next step will be configure based generation of the makefile. Not in this release, because automake doesn't really support Sun Studio compiler well (KPIC has been obsoleted by -xcode).
Modified: tomcat/connectors/trunk/jk/native/netscape/Makefile.linux tomcat/connectors/trunk/jk/native/netscape/Makefile.solaris Modified: tomcat/connectors/trunk/jk/native/netscape/Makefile.linux URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/Makefile.linux?view=diff&rev=562182&r1=562181&r2=562182 ============================================================================== --- tomcat/connectors/trunk/jk/native/netscape/Makefile.linux (original) +++ tomcat/connectors/trunk/jk/native/netscape/Makefile.linux Thu Aug 2 09:54:20 2007 @@ -1,13 +1,17 @@ # Defines for example NSAPI programs running under Linux -#gcc +# gcc # If you get relocation errors, try: # 1. compiling with Sun's cc # 2. statically linking with libgcc # 3. Adjusting LD_LIBRARY_PATH to grab libgcc_s -CC_CMD=gcc -fpic -DNET_SSL -DLinux -DLINUX -D_REENTRANT -DXP_UNIX +CC=gcc +# For 64 Bit builds, add "-m64" to CFLAGS +CFLAGS="-fPIC" +LD_SHAREDCMD=$(CC) -shared -lthread -LD_SHAREDCMD=gcc -shared +CC_CMD=$(CC) $(CFLAGS) -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX \ + -DMCC_HTTPD -DSPAPI20 OS_TYPE=linux INCLUDEDIR=$(SUITSPOT_HOME)/include @@ -28,7 +32,7 @@ all: nsapi_redirector.so -nsapi_redirector.so: $(PLUGIN_OBJ) $(JK_OBJS) +nsapi_redirector.so: $(JK_OBJS) $(PLUGIN_OBJ) $(LD_SHAREDCMD) $(JK_OBJS) $(PLUGIN_OBJ) -o nsapi_redirector.so $(EXTRA_LDDEFINES) clean: Modified: tomcat/connectors/trunk/jk/native/netscape/Makefile.solaris URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/Makefile.solaris?view=diff&rev=562182&r1=562181&r2=562182 ============================================================================== --- tomcat/connectors/trunk/jk/native/netscape/Makefile.solaris (original) +++ tomcat/connectors/trunk/jk/native/netscape/Makefile.solaris Thu Aug 2 09:54:20 2007 @@ -1,20 +1,25 @@ # Defines for example NSAPI programs running under SOLARIS -#gcc +# Choose between the settings for gcc or Sun Studio compiler + +# gcc # If you get relocation errors, try: # 1. compiling with Sun's cc # 2. statically linking with libgcc # 3. Adjusting LD_LIBRARY_PATH to grab libgcc_s -CC_CMD=gcc -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX \ - -DMCC_HTTPD -DSPAPI20 \ - -fPIC - -#SunStudio cc compiler -#CC_CMD=cc -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX \ -# -DMCC_HTTPD -DSPAPI20 \ -# -xcode=pic32 +CC=gcc +# For 64 Bit builds, add "-m64" to CFLAGS +CFLAGS=-fPIC +LD_SHAREDCMD=$(CC) -shared -lthread + +# Sun Studio cc compiler +#CC=cc +# For 64 Bit builds, add "-xtarget=generic64" to CFLAGS and #LD_SHAREDCMD +#CFLAGS=-xcode=pic32 +#LD_SHAREDCMD=$(CC) -G -lthread -LD_SHAREDCMD=ld -G -fPIC +CC_CMD=$(CC) $(CFLAGS) -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX \ + -DMCC_HTTPD -DSPAPI20 all: @@ -44,4 +49,4 @@ rm -f *.o nsapi_redirector.so $(JK_OBJS) %.o : %.c - $(CC_CMD) $(INCLUDE_FLAGS) -c $< + $(CC_CMD) $(INCLUDE_FLAGS) -c $< --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]