data cartridge dll issues

From: Toby Room <s344024_at_student.uq.edu.au>
Date: Mon, 01 Nov 1999 23:34:05 +1000
Message-ID: <381D96CD.86FDC1B4_at_student.uq.edu.au>


# $Id: makefile.dos,v 6.2 1998/06/24 18:10:46 vakatov Exp $
##################################################
###  Makefile to build one of PC version of NCBI toolkit
#####

!ifdef NCBIHOME

BUILD_BASE = $(NCBIHOME)\lib_source
INC_BASE = $(NCBIHOME)\headers
!else

BUILD_BASE = build
INC_BASE = ..\include
!endif

ARG_BASE = NCOPY_BIN=1
!ifdef DBUG

DEBUG_SFX =
DEBUG_FLG = DBUG=1
!endif

!ifdef CONSOLE

WIN_FLG = C
!else

WIN_FLG = W
!endif

!ifdef WIN32D

WIN32   = 1
DLL_SFX = _
DLL_FLG = DLL=1

!endif

!ifdef WIN32

#BLD_SFX = m32
BLD_SFX =
BIT_FLG = MSW=1 WIN32$(WIN_FLG)=1
#INC_SFX = 32
INC_SFX =
!else
!ifdef BOR

BLD_SFX =
BIT_FLG = B$(WIN_FLG)N=1
INC_SFX =
ARG_EXTRA = -N

!else
!ifdef CONSOLE
!error CONSOLE APPLICATIONS ARE NOT AVAILABLE UNDER 16-BIT MS-WINDOWS!!!
!endif
!ifdef B16
BLD_SFX = b16
BIT_FLG = B16=1
INC_SFX = 16
ARG_EXTRA = -N

!else
BLD_SFX = m16
BIT_FLG = MSW=1
INC_SFX = 16

!endif
!endif
!endif
BUILD = $(BUILD_BASE)$(DEBUG_SFX)$(DLL_SFX)$(BLD_SFX)
INC   = $(INC_BASE)$(INC_SFX)
ARG   = $(ARG_EXTRA) $(ARG_BASE) $(DEBUG_FLG) $(DLL_FLG) $(BIT_FLG) INCPATH=$(INC)
FLAG  = flag$(DEBUG_SFX)$(DLL_SFX).$(BLD_SFX)

!undef DBUG
!undef CONSOLE
!undef WIN32
!undef BOR

# must be run from inside the BUILD directory nocopy: make_exe.dos make_lib.dos make_gen.dos makeall.dos makedemo.dos makenet.dos $(FLAG)

        $(MAKE) -f makeall.dos  $(ARG) nocopy
        $(MAKE) -f makedemo.dos $(ARG) nocopy
        $(MAKE) -f makenet.dos  $(ARG) nocopy

noexe: make_lib.dos make_gen.dos makeall.dos makedemo.dos makenet.dos $(FLAG)
        $(MAKE) -f makeall.dos  $(ARG) noexe
        $(MAKE) -f makenet.dos  $(ARG) noexe


# must be run from inside the MAKE directory copy:

        mkdir ..\$(BUILD)
        copy *.dos ..\$(BUILD)
        copy *.bat ..\$(BUILD)
        cd ..\$(BUILD)
        echo "Denis Vakatov, NCBI" > $(FLAG)
        $(MAKE) -f makeall.dos  $(ARG) copy
        $(MAKE) -f makedemo.dos $(ARG) copy
        $(MAKE) -f makenet.dos  $(ARG) copy

# can be run from any directory
# by the time, the relevant sources must be deployed and all needed libraries
# must be built - using the "copy" and "nocopy" targets, with the same options # (it uses only files from the relevant INCLUDE.* and BUILD*.* directories) user: $(MAKEUSER)

        $(MAKE) -f $(MAKEUSER) $(ARG) LIBPATH=$(BUILD)



# $Id: make_lib.dos,v 6.6 1998/06/24 17:55:29 vakatov Exp $
########################################################################
#  This file describes rules to build NCBI-toolkit-based library.
#  Below is an example of using this file(along with another template
#  "make_gen.dos").
#
########################################################################
#NCBI_DLL = 1 -- use this if the target library can be built as a DLL
#!include "$(LIBPATH)\make_gen.dos"
#LIB_NAME = ncbiobj
#LIB_LIB  = $(LIB1)
#LIB_OBJ  = $(OBJ2)
#LIB_PREOPT  =
#LIB_OPT  =
#LIB_STDLIB  =
#RES =
#RES_DEP =
#!include "$(LIBPATH)\make_lib.dos"
########################################################################
# For more detail explanations see in the file "make/_howto_.dos"
########################################################################

# remove '+' before the object module filenames(for non-Borland tools) LIB_OBJ1 = $(LIB_OBJ:+=)

#############################################################################
# Compose default input/output file names
!ifdef NCBI_DLL

LIBRARY = $(LIB_NAME).dll
!else

LIBRARY = $(LIB_NAME).lib
!endif
########################################################################
XCFLAGS = $(LIB_PREOPT) $(CFLAGS) $(LIB_OPT) .c.obj:

        $(CC) $(XCFLAGS) $*.c

.cxx.obj:

        $(CC) $(XCFLAGS) $*.cxx

!ifdef NCBI_DLL
!ifdef RES

LIB_RC = $(LIB_NAME).rc
LIB_RES = $(LIB_NAME).res
$(LIB_RES): $(TEST_RC) $(RES_DEP)
    $(RC) -r -I$(INCPATH) -I$(LIBPATH) $(LIB_RC)
!endif
!endif

##### special rules to build some of the NCBI toolkit object files ncbithrs.c: ncbithr.c

        copy ncbithr.c ncbithrs.c
ncbithrs.obj: ncbithrs.c

        $(CC) _at_<<
-DNCBI_NOTHREADS_AVAIL $(XCFLAGS) $*.c
<<
###
regex.obj: regex.c

        $(CC) _at_<<
-DREGEX_NCBI -DREGEX_MALLOC $(XCFLAGS) $*.c <<
###
ncbidrwg.c: ncbidraw.c

        copy ncbidraw.c ncbidrwg.c
###
naccentr.c: accentr.c

        copy accentr.c naccentr.c
naccentr.obj: naccentr.c

        $(CC) _at_<<
$(XCFLAGS) -D_NETENT_ $*.c
<<
###
caccentr.c: accentr.c

        copy accentr.c caccentr.c
caccentr.obj: caccentr.c

        $(CC) _at_<<
$(XCFLAGS) -D_NET_AND_CD_ $*.c
<<
###
objmla.obj: objmla.c

        $(CC) _at_<<
$(XCFLAGS) -DNLM_OBJ_INCL="mampla.h" $*.c <<
###
txcdproc.obj: txcdproc.c

        $(CC) _at_<<
$(XCFLAGS) -DTAXSERVICE $*.c
<<

tc2proc.obj: tc2proc.c

        $(CC) _at_<<
$(XCFLAGS) -DTAXSERVICE $*.c
<<

########################################################################

copy: $(LIBRARY)
nocopy: $(LIBRARY)

!ifdef NCBI_DLL

XLIB_LIB = $(LIB_LIB)
!endif

$(LIBRARY) : $(LIB_OBJ1) $(LIB_RES) $(XLIB_LIB)         $(DEL) $_at_
!ifdef BORLAND

        tlib $_at_ $(LIBFLAGS) @<<
$(LIB_OBJ)
<<
!else
!ifdef WIN32
!ifdef NCBI_DLL

        link /DLL /NODEFAULTLIB:LIBC $(DBUG_FLG) /OUT:$_at_ /MAP:$*.map /IMPLIB:$*.lib $(LIB_OBJ1) $(LIB_RES) $(XLIB_LIB) $(LIB_STDLIB) $(STDLIB)
!else

        lib /OUT:$_at_ $(LIB_OBJ1)
!endif
!else

        lib /PAGESIZE:128 _at_<<
$_at_
y
$(LIB_OBJ1)
;
<<
!endif
!endif



# $Id: make_gen.dos,v 6.9 1999/03/15 22:54:52 vakatov Exp $
########################################################################
#  This file specifies attributes common for the NCBI toolkit
#  makefiles "makeall.dos", "makedemo.dos", "makenet.dos",
#  "make_exe.dos" and "make_exe.dos":
#
#	building tools;
#	compiler, librarian and linker flags;
#	library aliases;
#	some rules.
#
########################################################################

#####
#       Microsoft Visual C/C++ 32-bit MSWindows (GUI application)
#               [ "nmake MSW=1 WIN32=1" ]
#       Microsoft Visual C/C++ 32-bit MSWindows (Console application)
#               [ "nmake MSW=1 WIN32C=1" ]
#       Microsoft Visual C/C++ 16-bit MSWindows (GUI application)
#               [ "nmake MSW=1" ]
#
#       Borland C/C++ 4.5 for 32-bit MSWindows (GUI application)
#               [ "make BWN=1" ]
#       Borland C/C++ 4.5 for 32-bit MSWindows (Console application)
#               [ "make BCN=1" ]
#       Borland C/C++ 4.5 for 16-bit MSWindows (GUI application)
#               [ "make B16=1" ]

#####

RC = rc
LINK = link

#!ifndef DLL
#!undef NCBI_DLL
#!endif


##################################################
# Microsoft C under MS Windows
!ifdef MSW

GOTONE = 1
CC = cl

!ifdef DBUG

DFLAGS = -Od -Zi -D_DEBUG
!endif

!ifdef WIN32C

WIN32 = 1
SUB_SYS = CONSOLE
!else
!ifdef WIN32W

WIN32 = 1
!endif

MSWINDOWS = 1
SUB_SYS = WINDOWS
!endif

!ifdef WIN32
!ifdef DBUG

DBUG_SFX =
DBUG_FLG = /DEBUG
!else

DFLAGS = -O2
!endif
!ifdef DLL
!ifdef NCBI_DLL

CFLAGS0 = /MD$(DBUG_SFX) -DNLM_IMPORT="extern __declspec(dllimport)" -DNLM_EXPORT="__declspec(dllexport)"
!else

CFLAGS0 = /MD$(DBUG_SFX)
!endif
!else

CFLAGS0 = /MT$(DBUG_SFX)
!endif

CFLAGS1 = -c -YX -DWIN32 -W3 $(DFLAGS) $(CFLAGS0) LDFLAGS1 = -YX -W3 $(DFLAGS)
LFLAGS = /SUBSYSTEM:$(SUB_SYS) $(DBUG_FLG) /NODEFAULTLIB:LIBC STDLIB0 = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib

!else

LFLAGS0 = /NOE /NOD /ONERROR:NOEXE /PACKC /PACKD ALIGN = 64
NSEGS = 500
!ifdef DBUG

LFLAGS = $(LFLAGS0) /CO
!else

DFLAGS = -O
LFLAGS = $(LFLAGS0)
!endif

CFLAGS0 = -AL -G2s -GA -Gt4 -W3 -DWIN16 $(DFLAGS) CFLAGS1 = $(CFLAGS0) -c
LDFLAGS1 = $(CFLAGS0)
STDLIB0= commdlg llibcew libw oldnames shell
!endif
!endif

# Microsoft C under MS Windows

##################################################


##################################################
# Borland C++ 4.5 under MSWindows
!ifdef BWN
WIN32     = 1
MSWINDOWS = 1
STD_OBJ   = c0w32
LDFLAGS01 = -aa
BORLAND   = 1

!endif

!ifdef BCN

WIN32     = 1
STD_OBJ   = c0x32
LDFLAGS01 = -ap
BORLAND   = 1

!endif

!ifdef B16

MSWINDOWS = 1
BORLAND = 1
!endif

!ifdef BORLAND

GOTONE = 1 ### WIN32 / WIN16
!ifdef WIN32

RC   = brcc32
CC   = bcc32
LINK = tlink32

STDLIB0 = import32 cw32mt
W32_W16 = -N -DWIN32 -Di386 -WM
LDFLAGS02 = -Tpe
!else

CC = bcc
LINK = tlink
STD_OBJ = c0wl
STDLIB0 = mathwl import cwl
W32_W16 = -Ff=16 -a2 -ml -DWIN16
LDFLAGS02 = -Twe -d
!endif

### DEBUG / OPTIMIZE
!ifdef DBUG

D_FLAG = -v
CFLAGS0 = -Od -D_DEBUG
!else

CFLAGS0 = -k- -O2
!endif

### Ultimate Flags:

CFLAGS1  = -i65 -w- -c $(D_FLAG) $(W32_W16) $(CFLAGS0)
LDFLAGS1 = -c -m $(D_FLAG) $(LDFLAGS01) $(LDFLAGS02)
LIBFLAGS = /C /E /P128

#LIBFLAGS = /C /E /P64
!endif

# Borland C++ 4.5 under MSWindows
##################################################


##################################################
# NETWORK & ENCRIPTION
!ifdef WIN32
!ifdef MSW

NETLIBS = wsock32.lib
!endif
!else

NETLIBS = winsock.lib
!endif
##################################################
# Check for proper platform
!ifndef GOTONE
!error PLATFORM NOT DEFINED!! [ MSW, BWN, BCN, B16 ]
!endif
##################################################
# Path for libraries, include files and executables
!ifndef LIBPATH

LIBPATH = .
!endif

!ifndef INCPATH

INCPATH = ..\include
!endif

!ifdef NCOPY_BIN

BINPATH = .
COPY_BIN = echo
!else

BINPATH = ..\bin
COPY_BIN = copy
!endif

##################################################
# Compiler and linker flags
CFLAGS  = -DNETP_INET_WSOCK $(CFLAGS1) -I$(INCPATH)
LDFLAGS = $(LDFLAGS1)
STDLIB  = $(NETLIBS) $(STDLIB0)


##################################################
# List of NCBI libraries

!ifdef WIN32

MT_OBJ = $(LIBPATH)\ncbithr.obj
MAIN_OBJ = $(LIBPATH)\ncbimain.obj
!endif

XLIB1= ncbi
LIB1 = $(LIBPATH)\$(XLIB1).lib

XLIB2= ncbiobj
LIB2 = $(LIBPATH)\$(XLIB2).lib

XLIB3= ncbicdr
LIB3 = $(LIBPATH)\$(XLIB3).lib

XLIB5= ncbiacc
LIB5 = $(LIBPATH)\$(XLIB5).lib

XLIB6= netcli
LIB6 = $(LIBPATH)\$(XLIB6).lib

XLIB7= netentr
LIB7 = $(LIBPATH)\$(XLIB7).lib

XLIB8= ncbinacc
LIB8 = $(LIBPATH)\$(XLIB8).lib

XLIB9= ncbicacc
LIB9 = $(LIBPATH)\$(XLIB9).lib

# LIB10 is reserved for ncsasock
XLIB10=
LIB10 = XLIB11= medarch
LIB11 = $(LIBPATH)\$(XLIB11).lib

XLIB15= netclie
LIB15 = $(LIBPATH)\$(XLIB15).lib

XLIB21= ncbibls2
LIB21 = $(LIBPATH)\$(XLIB21).lib

XLIB22= ncbimmdb
LIB22 = $(LIBPATH)\$(XLIB22).lib

XLIB23= ncbitool
LIB23 = $(LIBPATH)\$(XLIB23).lib

XLIB36= netblast
LIB36 = $(LIBPATH)\$(XLIB36).lib

XLIB40= ncbitxc2
LIB40 = $(LIBPATH)\$(XLIB40).lib
LIB29 = $(LIB40)

XLIB41= ncbiid1
LIB41 = $(LIBPATH)\$(XLIB41).lib

!ifdef MSWINDOWS

XLIB4 = vibrant
LIB4 = $(LIBPATH)\$(XLIB4).lib
XLIB20= ncbidesk
XLIB28= vibgif
!ifdef WIN32

XLIB30 = ncbicn3d
LIB30 = $(LIBPATH)\$(XLIB30).lib
!endif

XLIB31 = vibnet
LIB31 = $(LIBPATH)\$(XLIB31).lib
!endif

LIB20 = $(LIBPATH)\ncbidesk.lib

# special case: GIF-dump applications are console; and still require
# some of Vibrant functionality
# (actually, Vibrant should has been splitted to GUI and non-GUI parts)
LIB28 = $(LIBPATH)\vibgif.lib $(LIBPATH)\vibrant.lib

XNETCLILIB = netcli$(ENCR)

NETCLILIB = $(LIBPATH)\$(XNETCLILIB).lib
XENTREZLIBS = $(XLIB8) $(XLIB7) $(XNETCLILIB) $(XLIB3)
ENTREZLIBS  = $(LIB8)  $(LIB7)  $(NETCLILIB)  $(LIB3)


##################################################

!ifdef WIN32

DEL = -del
!else

DEL = del
!endif
##########################################################

##########################################################
## All things to make
##

all: copy nocopy

##################################################
# (to clean out the directory without removing make) clean:
	$(DEL) *.c
	$(DEL) *.h
	$(DEL) *.obj
	$(DEL) *.lib
	$(DEL) *.def
	$(DEL) *.rc
	$(DEL) *.res
	$(DEL) *.map


##################################################
# Implicit rules
.c.obj:

        $(CC) $(CFLAGS) $*.c
.cxx.obj:

        $(CC) $(CFLAGS) $*.cxx

##################################################
# Templates to use in the application build rules
!ifdef MSW

PLATF0 = MSW=$(MSW)
!ifdef WIN32
!ifdef WIN32C

PLATF1 = WIN32C=$(WIN32C)
!else

PLATF1 = WIN32W=$(WIN32W)
!endif
!endif

X_PLATF = $(PLATF0)^
$(PLATF1)
!endif

!ifdef BORLAND

MAKE = $(MAKE) -N
!ifdef BWN

X_PLATF = BWN=$(BWN)
!endif
!ifdef BCN

X_PLATF = BCN=$(BCN)
!endif
!ifdef B16

X_PLATF = B16=$(B16)
!endif
!endif

!ifdef DBUG

X_DBUG = DBUG=$(DBUG)
!endif
!ifdef DLL

X_DLL = DLL=$(DLL)
!endif
!ifdef MT

X_MT = MT=$(MT)
!endif
!ifdef NCOPY_BIN

X_NCOPY_BIN = NCOPY_BIN=$(NCOPY_BIN)
!endif

!ifdef ENCR

X_ENCR = ENCR=$(ENCR)
!endif

DLL_AVAIL = NCBI_DLL=1 INCLUDE_GEN = ^

LIBPATH=$(LIBPATH)^
INCPATH=$(INCPATH)^
BINPATH=$(BINPATH)^
$(X_PLATF)^
$(X_DBUG)^
$(X_DLL)^
$(X_MT)^

$(X_NCOPY_BIN)^
$(X_ENCR)^
!include $(LIBPATH)\make_gen.dos

INCLUDE_EXE = !include $(LIBPATH)\make_exe.dos INCLUDE_LIB = !include $(LIBPATH)\make_lib.dos Received on Mon Nov 01 1999 - 14:34:05 CET

Original text of this message