File: Makefile.win.bc

package info (click to toggle)
swig 1.1p5-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 9,428 kB
  • ctags: 5,025
  • sloc: cpp: 21,599; ansic: 13,333; yacc: 3,297; python: 2,794; makefile: 2,182; perl: 1,984; tcl: 1,583; sh: 736; lisp: 201; objc: 143
file content (151 lines) | stat: -rw-r--r-- 3,929 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# ---------------------------------------------------------------------------
# Makefile.win
#
# Dave Beazley
# June 24, 1997
#
# This file is used to build all of the examples in the 'Examples' directory
# under Windows 95/NT.    This assumes that you are using Borland C++ 5.x.
#
# By default this only builds DLLs.
# ---------------------------------------------------------------------------

# Location of the Borland C++ directory
TOOLS         = e:\bc5

# The C/C++ compiler
CC            = bcc32.exe

# The linker
LINK          = tlink32.exe

# Include directories for your compiler
INCLUDE32     = -I"$(TOOLS)\include"

# Target machine
MACHINE       = 

# Startup code for the DLL (for example C0D32.obj)
STARTUP      = C0D32.obj

# Import library
IMPORT       = IMPORT32.lib

# Runtime library
RUNTIME      = CW32MT.lib

# Linker options
LOPT      = 

# C compiler flags
CFLAGS    =  -c -w- $(OPTS)

# SWIG Installation
SWIG      = c:\swig1.1\swig

# Now munge the files provided
# SRCS     = list of source files
# WRAPFILE = Outfile file for SWIG

SRCS         = $(SRCS) $(WRAPFILE)

# Get rid of /Tp option from Visual C++ and change it to -P for BC++
RSRCS        = $(SRCS:/Tp=-P )

# Form object files
CXXOBJS        = $(SRCS:.cxx=.obj) 
COBJS          = $(CXXOBJS:.c=.obj)
OBJS           = $(COBJS:/Tp=)


# ------------------------------------------------------------------
# Tcl settings
# 
# TCL_INCLUDES  = Include files for your Tcl installation.
#                 Typically you want Tcl/generic and Tcl/win.
# TCLLIB        = The location of the tcl library
# ------------------------------------------------------------------

TCL_INCLUDES  = -Id:\tcl8.0\generic -Id:\tcl8.0\win
TCLLIB         = d:\tcl8.0\win\tcl80.lib

tcl::
	echo $(OBJS)
	$(SWIG) -tcl -o $(WRAPFILE) $(SWIGOPT) $(INTERFACE)
	$(CC) $(CFLAGS) -DWIN32 $(TCL_INCLUDES) $(RSRCS) 
# This is a gross hack to generate a configuration file since the command line doesn't
# seem to work
	@echo /Tpd /L"$(TOOLS)\lib" /j"$(TOOLS)\lib" $(STARTUP) +> tlink32.cfg
	@echo $(OBJS),+>> tlink32.cfg
	@echo $(TARGET),,+>> tlink32.cfg
	@echo $(IMPORT) $(RUNTIME) $(TCLLIB)+>> tlink32.cfg
	$(LINK) @tlink32.cfg 
	@del tlink32.cfg

# ------------------------------------------------------------------
# Python settings
# 
# PY_INCLUDES  = Include files for your Python installation.  Typically
#                you need the python-1.5\Include python-1.5\ and python-1.5\PC
#                directories here.
# PYLIB        = The location of the Python library
# ------------------------------------------------------------------


PY_INCLUDES  = -Id:\python-1.5\Include -Id:\python-1.5 -Id:\python-1.5\PC
PYLIB        = d:\python-1.5\PCbuild\Debug\python15.lib
PYFLAGS      = /D __WIN32__

python::
	@echo Borland makefile for Python extensions not implemented yet.

# ------------------------------------------------------------------
# Perl settings
# 
# PERL_INCLUDE = Include files for your Perl installation
# PERLLIB      = The location of the Perl library
# PERLFLAGS    = Perl specific compilation flags
# ------------------------------------------------------------------

# These are for Perl5.004 
PERL_INCLUDE = -Ic:\packages\borland\perl\lib\CORE 
PERLLIB      = c:\packages\borland\perl\lib\CORE\perl.lib
PERLFLAGS    = /DWIN32 /DMSWIN32 /DWIN32IO_IS_STDIO 

perl::
	echo $(OBJS)
	$(SWIG) -perl5 -o $(WRAPFILE) $(SWIGOPT) $(INTERFACE)
	$(CC) $(CFLAGS) -DWIN32 $(PERL_INCLUDE) $(PERLFLAGS) $(RSRCS) 
# This is a gross hack to generate a configuration file since the command line doesn't
# seem to work
	@echo /Tpd /L"$(TOOLS)\lib" /j"$(TOOLS)\lib" $(STARTUP) +> tlink32.cfg
	@echo $(OBJS),+>> tlink32.cfg
	@echo $(TARGET),,+>> tlink32.cfg
	@echo $(IMPORT) $(RUNTIME) $(PERLLIB)+>> tlink32.cfg
	$(LINK) @tlink32.cfg 
	@del tlink32.cfg

clean::
	del *.obj
	del *.dll
	del *.exp
	del *.lib
	del *.pdb
	del *.map
	del *_wrap*
	del *~