URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [insight/] [tix/] [win/] [makefile.bc] - Rev 1771
Go to most recent revision | Compare with Previous | Blame | View Log
# makefile.bc --
#
# Borland C++ 4.5/5.0 makefile for Tix.
#
# Copyright (c) 1996, Expert Interface Technologies
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# uncomment the following two lines to compile with TCL_MEM_DEBUG
#DEBUGDEFINES =TCL_MEM_DEBUG
#----------------------------------------------------------------------
# Environment setting
#
# You can set the following variables in your DOS environment. This
# way you don't need to change this file. E.g.:
#
# set TCL_VER=7.5
# make -f makefile.vc
#
# You can also set these variables in the command line to make. E.g.:
#
# make TCL_VER=7.5 -f makefile.bc
#
# TOOLS = location of BC++ 32-bit development tools.
# (DEFAULT: C:\BC45)
# TIX_DEBUG = Compile Tix with debug information.
# (DEFAULT: undefined -- debug is not enabled.)
# TCL_VER = version of Tcl to compile with. Should be either 7.5
# or 7.6
# (DEFAULT: Compile with Tcl 7.6)
#----------------------------------------------------------------------
!IFNDEF TOOLS
TOOLS = C:\BC45
!ENDIF
!IFNDEF TIX_DEBUG
NODEBUG = 1
!ENDIF
!IFNDEF TCL_VER
TCL_VER = 7.6
!ENDIF
!IF "$(TCL_VER)" == "7.5"
TMPDIR = tcl7.5
TCLDIR = ..\..\tcl7.5
TKDIR = ..\..\tk4.1
TCLLIB = tcl75.lib
TCLDLL = tcl75.dll
TKLIB = tk41.lib
TKDLL = tk41.dll
TIXLIB = $(TMPDIR)\tix4175.lib
TIXDLL = $(TMPDIR)\tix4175.dll
TIXWISH = $(TMPDIR)\tix4175.exe
CONSOLE_OBJ = tkConsole41.obj
!ENDIF
!IF "$(TCL_VER)" == "7.6"
TMPDIR = tcl7.6
TCLDIR = ..\..\tcl7.6
TKDIR = ..\..\tk4.2
TCLLIB = tcl76.lib
TCLDLL = tcl76.dll
TKLIB = tk42.lib
TKDLL = tk42.dll
TIXLIB = $(TMPDIR)\tix4176.lib
TIXDLL = $(TMPDIR)\tix4176.dll
TIXWISH = $(TMPDIR)\tix4176.exe
CONSOLE_OBJ = tkConsole42.obj
!ENDIF
!IF "$(TCL_VER)" == "8.0a1"
TMPDIR = tcl8.0
TCLDIR = ..\..\tcl8.0a1
TKDIR = ..\..\tk8.0a1
TCLLIB = tcl80.lib
TCLDLL = tcl80.dll
TKLIB = tk80.lib
TKDLL = tk80.dll
TIXLIB = $(TMPDIR)\tix4180.lib
TIXDLL = $(TMPDIR)\tix4180.dll
TIXWISH = $(TMPDIR)\tix4180.exe
CONSOLE_OBJ = tkConsole80a1.obj
!ENDIF
!IF "$(TCL_VER)" == "8.0b1"
TMPDIR = tcl8.0
TCLDIR = ..\..\tcl8.0b1
TKDIR = ..\..\tk8.0b1
TCLLIB = tcl80.lib
TCLDLL = tcl80.dll
TKLIB = tk80.lib
TKDLL = tk80.dll
TIXLIB = $(TMPDIR)\tix4180.lib
TIXDLL = $(TMPDIR)\tix4180.dll
TIXWISH = $(TMPDIR)\tix4180.exe
CONSOLE_OBJ = tkConsole80b1.obj
!ENDIF
!IF "$(TCL_VER)" == "2.2i"
TMPDIR = itcl2.2
ITCL_DIR = ..\..\itcl2.2
TCLDIR = $(ITCL_DIR)\tcl7.6
TKDIR = $(ITCL_DIR)\tk4.2
TCLLIB = tcl76i.lib
TCLDLL = tcl76i.dll
TKLIB = tk42i.lib
TKDLL = tk42i.dll
TIXLIB = $(TMPDIR)\tix41761.lib
TIXDLL = $(TMPDIR)\tix41761.dll
TIXWISH = $(TMPDIR)\tix41761.exe
CONSOLE_OBJ = tkConsole42.obj
ITCL_LIBS = $(ITCL_DIR)\itcl\win\itcl22.lib $(ITCL_DIR)\itk\win\itk22.lib
ITCL_INCLUDES = $(ITCL_DIR)\itcl\generic;$(ITCL_DIR)\itk\generic
ITCL_DEFINES = ITCL_2
!ENDIF
!IFNDEF TCLDIR
!ERROR "Unsupported Tcl version $(TCL_VER)"
!ENDIF
#
# ROOT = top of source tree
# TMPDIR = location where .obj files should be stored during build
#
ROOT = ..
#
# Borland C++ tools
#
BORLAND = $(TOOLS)
IMPLIB = Implib
BCC32 = Bcc32
BCC = Bcc
RC = brcc32
CP = copy
RM = del
TCL_INCLUDES = $(TCLDIR)\generic;$(TCLDIR)\win;$(ITCL_INCLUDES)
TK_INCLUDES = $(TKDIR)\generic;$(TKDIR)\xlib;$(TKDIR)\win
TIX_INCLUDES = $(ROOT)\generic;$(ROOT)\win
INCLUDES = $(BORLAND)\include;$(TIX_INCLUDES);$(TK_INCLUDES);$(TCL_INCLUDES)
LIBDIRS = $(BORLAND)\lib;$(ROOT)\win
TCLLIBDIR = $(TCLDIR)\win
TKLIBDIR = $(TKDIR)\win
!ifndef DEBUG
# these macros cause maximum optimization and no symbols
DEBUGLDFLAGS =
DEBUGCCFLAGS = -v- -vi- -O2
!else
# these macros enable debugging
DEBUGLDFLAGS = -v
DEBUGCCFLAGS = -k -Od -v
!endif
DEFINES = _RTLDLL;$(DEBUGDEFINES);__BORLAND;$(ITCL_DEFINES)
PROJECTCCFLAGS= $(DEBUGCCFLAGS) -w-par -w-stu
LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32
LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32
LNLIBS_exe=$(TIXLIB) $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) \
$(ITCL_LIBS) import32 cw32i
LNLIBS_dll=$(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) \
$(ITCL_LIBS) import32 cw32i
#
# Global makefile settings
#
.AUTODEPEND
.CACHEAUTODEPEND
.suffixes: .c .dll .lib .obj .exe
.path.c=$(ROOT)\win;$(ROOT)\generic;$(ROOT)\xlib
.path.obj=$(TMPDIR)
WISHOBJS = \
$(TMPDIR)\tixWinMain.obj
TIXOBJS = \
$(TMPDIR)\$(CONSOLE_OBJ) \
$(TMPDIR)\tixClass.obj \
$(TMPDIR)\tixCmds.obj \
$(TMPDIR)\tixCompat.obj \
$(TMPDIR)\tixDiImg.obj \
$(TMPDIR)\tixDiITxt.obj \
$(TMPDIR)\tixDiStyle.obj \
$(TMPDIR)\tixDItem.obj \
$(TMPDIR)\tixDiText.obj \
$(TMPDIR)\tixDiWin.obj \
$(TMPDIR)\tixError.obj \
$(TMPDIR)\tixForm.obj \
$(TMPDIR)\tixFormMisc.obj\
$(TMPDIR)\tixGeometry.obj\
$(TMPDIR)\tixGrData.obj \
$(TMPDIR)\tixGrid.obj \
$(TMPDIR)\tixGrFmt.obj \
$(TMPDIR)\tixGrRC.obj \
$(TMPDIR)\tixGrSel.obj \
$(TMPDIR)\tixGrUtl.obj \
$(TMPDIR)\tixHLCol.obj \
$(TMPDIR)\tixHLHdr.obj \
$(TMPDIR)\tixHLInd.obj \
$(TMPDIR)\tixHList.obj \
$(TMPDIR)\tixImgCmp.obj \
$(TMPDIR)\tixImgXpm.obj \
$(TMPDIR)\tixInit.obj \
$(TMPDIR)\tixItcl.obj \
$(TMPDIR)\tixList.obj \
$(TMPDIR)\tixMethod.obj \
$(TMPDIR)\tixNBFrame.obj \
$(TMPDIR)\tixOption.obj \
$(TMPDIR)\tixScroll.obj \
$(TMPDIR)\tixSmpLs.obj \
$(TMPDIR)\tixTList.obj \
$(TMPDIR)\tixUtils.obj \
$(TMPDIR)\tixWCmpt.obj \
$(TMPDIR)\tixWidget.obj \
$(TMPDIR)\tixWinDraw.obj \
$(TMPDIR)\tixWinXpm.obj \
$(TMPDIR)\tixWinWm.obj
#
# Targets
#
all: cfgdll $(TIXDLL) cfgexe $(TIXWISH) cfgcln
test: cfgdll $(TIXDLL) cfgtest $(TKTEST) cfgcln
# Implicit Targets
.c.obj:
@$(BCC32) {$< }
.dll.lib:
$(IMPLIB) -c $@ $<
.rc.res:
$(RC) -i$(INCLUDES) $<
#
# Special case object file targets
#
$(TMPDIR)\testMain.obj : $(ROOT)\win\tixWinMain.c
$(BCC32) -c -o$@ $(ROOT)\win\tixWinMain.c
#
# Configuration file targets - these files are implicitly used by the compiler
#
cfgdll:
@$(CP) &&|
-n$(TMPDIR) -I$(INCLUDES) -c -WD
-D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
| bcc32.cfg >NUL
cfgexe:
@$(CP) &&|
-n$(TMPDIR) -I$(INCLUDES) -c -W
-D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
| bcc32.cfg >NUL
cfgtest:
@$(CP) &&|
-n$(TMPDIR) -I$(INCLUDES) -c -W
-D$(DEFINES);TCL_TEST -3 -d $(PROJECTCCFLAGS)
| bcc32.cfg >NUL
cfgcln:
@$(RM) bcc32.cfg
#
# Executable targets
#
$(TIXDLL): $(TIXOBJS) tix.def
tlink32 -L$(LIBDIRS) @&&|
$(LNFLAGS_dll) $(TIXOBJS)
$@
-x
$(LNLIBS_dll)
tix.def
|
$(TIXWISH): $(WISHOBJS) $(TIXLIB) $(TIXOBJS)
tlink32 -L$(LIBDIRS) @&&|
$(LNFLAGS_exe) $(WISHOBJS)
$@
-x
$(LNLIBS_exe)
|, &&|
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
|,
#
# Other dependencies
#
# The following rule automatically generates a tix.def file containing
# an export entry for every public symbol in the $(TKDLL) library.
tix.def: $(TIXOBJS)
$(TCLLIBDIR)\dumpexts.exe -o $@ $(TKDLL) @&&|
$(TIXOBJS)
|
# remove all generated files
clean:
-del $(TMPDIR)\*.obj
-del $(TMPDIR)\*.exp
-del $(TMPDIR)\*.res
-del $(TMPDIR)\*.def
-del $(TIXLIB)
-del $(TIXDLL)
-del $(TIXWISH)
-del bcc32.cfg
dist:
$(MAKE) TCL_VER=7.5
$(MAKE) TCL_VER=7.6
$(MAKE) TCL_VER=8.0b1
$(MAKE) TCL_VER=2.2i
distclean:
$(MAKE) -f makefile.bc TCL_VER=7.5 clean
$(MAKE) -f makefile.bc TCL_VER=7.6 clean
$(MAKE) -f makefile.bc TCL_VER=8.0b1 clean
$(MAKE) -f makefile.bc TCL_VER=2.2i clean
move:
tclsh76 n:/bin/mkdist.tcl ../dist/windist.tcl
Go to most recent revision | Compare with Previous | Blame | View Log