You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fu...@apache.org on 2004/07/30 19:06:28 UTC

cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test Makefile.netware

fuankg      2004/07/30 10:06:28

  Added:       ajp/ajplib/test Makefile.netware
  Log:
  Initial check-in so we can play on NetWare too.
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat-connectors/ajp/ajplib/test/Makefile.netware
  
  Index: Makefile.netware
  ===================================================================
  #
  # Makefile for ajplib (NetWare version - gnu make)
  # created by Guenter Knauf <ef...@gmx.net>
  #
  
  # Edit the path below to point to the base of your Apache 2.x includes.
  ifndef AP_HOME
  AP_HOME	= c:/projects/gccnlm/apache_2.0.50-sdk
  endif
  # Edit the path below to point to the base of your NetWare Java SDK.
  ifndef NW_JDK
  NW_JDK	= c:/projects/sdks/java-nw
  endif
  # Edit the path below to point to the base of your Novell NDK.
  ifndef NDKBASE
  NDKBASE	= c:/novell
  endif
  
  ifndef INSTDIR
  INSTDIR	= ../dist-$(AJP_VERSION_STR)-bin-nw
  endif
  
  # Edit the vars below to change NLM target settings.
  TARGETS = testajp.nlm
  LTARGET = libajp.lib
  VERSION	= $(AJP_VERSION)
  COPYR	= Copyright (c) 2000-2004 The Apache Software Foundation. All rights reserved.
  DESCR	= AJP lib for Jakarta/Tomcat $(AJP_VERSION_STR)
  MTSAFE	= YES
  STACK	= 64000
  #SCREEN	= none
  MODULES	= aprlib
  #EXPORTS	=
  # Comment the line below if you dont want to load protected automatically.
  LDRING	= 3
  
  # Edit the var below to point to your lib architecture.
  ifndef LIBARCH
  LIBARCH = LIBC
  endif
  NW_WINSOCK = 1
  
  # must be equal to DEBUG or NDEBUG
  DB	= NDEBUG
  # DB	= DEBUG
  # DB	= CURLDEBUG
  # Optimization: -O<n> or debugging: -g
  ifeq ($(DB),NDEBUG)
  	OPT	= -O2
  	OBJDIR	= release
  else
  	OPT	= -g
  	OBJDIR	= debug
  endif
  
  # Include the version info retrieved from ajp.h
  #-include $(OBJDIR)/version.inc
  AJP_VERSION = 1,0,0
  AJP_VERSION_STR = 1.0.0-dev-beta
  
  # Check if we are on Linux in order to set the echo delimiter if needed.
  ifeq ($(findstring linux,$(OSTYPE)),linux)
  DL	= '
  #-include $(NDKBASE)/nlmconv/ncpfs.inc
  endif
  
  # The following line defines your compiler.
  ifdef METROWERKS
  	CC = mwccnlm
  else
  	CC = gcc
  endif
  YACC	= bison -y
  CP	= cp -afv
  # RM	= rm -f
  # if you want to mark the target as MTSAFE you will need a tool for
  # generating the xdc data for the linker; here's a minimal tool:
  # http://www.gknw.com/development/prgtools/mkxdc.zip
  MPKXDC	= mkxdc
  
  # Global flags for all compilers
  CFLAGS	= $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
  CFLAGS	+= -DAJP_USE_HTTPD_WRAP
  
  ifeq ($(CC),mwccnlm)
  LD	= mwldnlm
  LDFLAGS	= -nostdlib $(PRELUDE) $(OBJS) $(OBJWRAP) $(<:.def=.o) -o $@ -commandfile
  AR	= mwldnlm
  ARFLAGS	= -type library -w nocmdline $(OBJDIR)/*.o -o
  CFLAGS	+= -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
  CFLAGS	+= -relax_pointers
  CFLAGS	+= -w on,nounused
  ifeq ($(LIBARCH),LIBC)
  	PRELUDE = $(SDK_LIBC)/imports/libcpre.o
  	CFLAGS += -align 4
  else
  	PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
  #	CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
  	CFLAGS += -align 1
  endif
  else
  LD	= nlmconv
  LDFLAGS	= -T
  AR	= ar
  ARFLAGS	= -cq
  CFLAGS	+= -fno-builtin -fpack-struct -fpcc-struct-return
  CFLAGS	+= -Wall -Wno-format # -pedantic
  ifeq ($(LIBARCH),LIBC)
  	PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
  else
  	PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
  	CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
  endif
  endif
  
  NDK_ROOT = $(NDKBASE)/ndk
  SDK_CLIB = $(NDK_ROOT)/nwsdk
  SDK_LIBC = $(NDK_ROOT)/libc
  
  INCLUDES += -I$(AP_HOME)/include
  
  ifeq ($(LIBARCH),LIBC)
  	INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
  	INCLUDES += -I$(SDK_LIBC)/include/winsock
  	CFLAGS += -D_POSIX_SOURCE
  #	CFLAGS += -D__ANSIC__
  else
  	INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
  	# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
  	CFLAGS += -DNETDB_USE_INTERNET
  endif
  CFLAGS	+= -I. $(INCLUDES)
  
  ifeq ($(MTSAFE),YES)
  	XDCOPT = -n
  endif
  ifeq ($(MTSAFE),NO)
  	XDCOPT = -u
  endif
  
  OBJS	= \
  	$(OBJDIR)/ajp_header.o \
  	$(OBJDIR)/ajp_link.o \
  	$(OBJDIR)/ajp_msg.o
  
  OBJWRAP	= $(OBJDIR)/httpd_wrap.o
  
  .PHONY: lib nlm prebuild dist install clean
  
  nlm: prebuild $(TARGETS) 
  
  lib: prebuild $(LTARGET)
  
  prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
  
  dist: all
  	-$(RM) $(OBJS) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
  	-$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
  
  install: $(INSTDIR) all
  	@$(CP) *.nlm $(INSTDIR)
  	@$(CP) ../CHANGES $(INSTDIR)
  	@$(CP) ../COPYING $(INSTDIR)
  	@$(CP) ../README $(INSTDIR)
  	@$(CP) ../RELEASE-NOTES $(INSTDIR)
  
  clean:
  	-$(RM) $(LTARGET) $(TARGETS) $(OBJWRAP) config.h
  	-$(RM) -r $(OBJDIR)
  
  %.lib: $(OBJS)
  	@echo Creating $@
  	@-$(RM) $@
  	@$(AR) $(ARFLAGS) $@ $^
  
  %.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc $(OBJS) $(OBJWRAP) 
  	@echo Linking $@
  	@-$(RM) $@
  	@$(LD) $(LDFLAGS) $<
  
  $(INSTDIR):
  	@mkdir $(INSTDIR)
  
  $(OBJDIR):
  	@mkdir $(OBJDIR)
  
  $(OBJDIR)/%.o: %.c
  #	@echo Compiling $<
  	$(CC) $(CFLAGS) -c $< -o $@
  
  $(OBJDIR)/version.inc: ajp.h $(OBJDIR)
  #	@echo Creating $@
  #	@awk -f ../packages/NetWare/get_ver.awk $< > $@
  
  $(OBJDIR)/%.xdc: Makefile.netware
  	@echo Creating $@
  	@$(MPKXDC) $(XDCOPT) $@
  
  $(OBJDIR)/%.def: Makefile.netware
  	@echo Creating $@
  	@echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
  	@echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
  	@echo $(DL)# All your changes will be lost!!$(DL) >> $@
  	@echo $(DL)#$(DL) >> $@
  	@echo $(DL)copyright "$(COPYR)"$(DL) >> $@
  	@echo $(DL)description "$(DESCR)"$(DL) >> $@
  	@echo $(DL)version $(VERSION)$(DL) >> $@
  ifdef NLMTYPE
  	@echo $(DL)type $(NLMTYPE)$(DL) >> $@
  endif
  ifdef STACK
  	@echo $(DL)stack $(STACK)$(DL) >> $@
  endif
  ifdef SCREEN
  	@echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
  else
  	@echo $(DL)screenname "DEFAULT"$(DL) >> $@
  endif
  ifeq ($(DB),DEBUG)
  	@echo $(DL)debug$(DL) >> $@
  endif
  	@echo $(DL)threadname "$^"$(DL) >> $@
  ifdef XDCOPT
  	@echo $(DL)xdcdata $(@:.def=.xdc)$(DL) >> $@
  endif
  ifeq ($(LDRING),0)
  	@echo $(DL)flag_on 16$(DL) >> $@
  endif
  ifeq ($(LDRING),3)
  	@echo $(DL)flag_on 512$(DL) >> $@
  endif
  ifeq ($(LIBARCH),CLIB)
  	@echo $(DL)start _Prelude$(DL) >> $@
  	@echo $(DL)exit _Stop$(DL) >> $@
  	@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
  	@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
  	@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
  	@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
  	@echo $(DL)module clib$(DL) >> $@
  else
  	@echo $(DL)flag_on 64$(DL) >> $@
  	@echo $(DL)pseudopreemption$(DL) >> $@
  	@echo $(DL)start _LibCPrelude$(DL) >> $@
  	@echo $(DL)exit _LibCPostlude$(DL) >> $@
  	@echo $(DL)check _LibCCheckUnload$(DL) >> $@
  	@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
  	@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
  	@echo $(DL)module libc$(DL) >> $@
  endif
  	@echo $(DL)import @$(AP_HOME)/lib/aprlib.imp$(DL) >> $@
  ifdef MODULES
  	@echo $(DL)module $(MODULES)$(DL) >> $@
  endif
  ifdef EXPORTS
  	@echo $(DL)export $(EXPORTS)$(DL) >> $@
  endif
  ifdef IMPORTS
  	@echo $(DL)import $(IMPORTS)$(DL) >> $@
  endif
  ifeq ($(LD),nlmconv)
  	@echo $(DL)input $(OBJS)$(DL) >> $@
  	@echo $(DL)input $(OBJWRAP)$(DL) >> $@
  	@echo $(DL)input $(PRELUDE)$(DL) >> $@
  	@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
  endif
  
  config.h: Makefile.netware
  	@echo Creating $@
  	@echo $(DL)/* $@ for NetWare target.$(DL) > $@
  	@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
  	@echo $(DL)** All your changes will be lost!!$(DL) >> $@
  	@echo $(DL)*/$(DL) >> $@
  	@echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
  	@echo $(DL)#define VERSION "$(AJP_VERSION_STR)"$(DL) >> $@
  	@echo $(DL)#define PACKAGE_BUGREPORT "ajp-bug@apache.org"$(DL) >> $@
  	@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
  	@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
  	@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
  	@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
  	@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
  	@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
  	@echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
  	@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
  	@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
  	@echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
  	@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
  	@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
  	@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
  ifdef NW_WINSOCK
  	@echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
  else
  	@echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
  	@echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
  endif
  ifdef OLD_NOVELLSDK
  	@echo $(DL)#define socklen_t int$(DL) >> $@
  endif
  
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org