summaryrefslogtreecommitdiffstats
path: root/bcc32/setup.mak
blob: 8f73b4f9f790f1a0dab1477d9e752b8236bc1f03 (plain)
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
# -*- makefile -*-

!if "$(srcdir)" != ""
bcc32dir = $(srcdir)bcc32/
!elseif "$(bcc32dir)" == "bcc32/"
srcdir = ./
!elseif "$(bcc32dir:/bcc32/=)/bcc32/" == "$(bcc32dir)"
srcdir = $(bcc32dir:/bcc32/=/)
!else
srcdir = $(bcc32dir)../
!endif
!if "$(prefix)" == ""
prefix = /usr
!endif
OS = bccwin32
RT = $(OS)
BANG = !
APPEND = echo>>$(MAKEFILE)
!ifdef MAKEFILE
MAKE = $(MAKE) -f $(MAKEFILE)
!else
MAKEFILE = Makefile
!endif

all: Makefile
Makefile: -prologue- -generic- -epilogue-
i386-$(OS): -prologue- -i386- -epilogue-
i486-$(OS): -prologue- -i486- -epilogue-
i586-$(OS): -prologue- -i586- -epilogue-
i686-$(OS): -prologue- -i686- -epilogue-
alpha-$(OS): -prologue- -alpha- -epilogue-

-prologue-: nul
	@echo Creating $(MAKEFILE)
	@type > $(MAKEFILE) &&|
\#\#\# Makefile for ruby $(OS) \#\#\#
$(BANG)ifndef srcdir
srcdir = $(srcdir:\=/)
$(BANG)endif
$(BANG)ifndef prefix
prefix = $(prefix:\=/)
$(BANG)endif
$(BANG)ifndef EXTSTATIC
EXTSTATIC = $(EXTSTATIC)
$(BANG)endif
!if defined(RDOCTARGET)
$(BANG)ifndef RDOCTARGET
RDOCTARGET = $(RDOCTARGET)
$(BANG)endif
!endif
!if defined(EXTOUT)
$(BANG)ifndef EXTOUT
EXTOUT = $(EXTOUT)
$(BANG)endif
!endif
|
	@type > usebormm.bat &&|
@echo off
ilink32 -Gn -x usebormm.lib > nul
if exist usebormm.tds echo MEMLIB = usebormm.lib
|
	@usebormm.bat >> $(MAKEFILE)
	@del usebormm.*

	@cpp32 -I$(srcdir) -P- -DRUBY_EXTERN="//" -o$(MAKEFILE) > nul &&|
\#include "version.h"
MAJOR = RUBY_VERSION_MAJOR
MINOR = RUBY_VERSION_MINOR
TEENY = RUBY_VERSION_TEENY
|
	@type $(MAKEFILE).i >> $(MAKEFILE)
	@del $(MAKEFILE).i

-generic-: nul
!if defined(PROCESSOR_ARCHITECTURE) ||  defined(PROCESSOR_LEVEL)
	@type >> $(MAKEFILE) &&|
!if defined(PROCESSOR_ARCHITECTURE)
$(BANG)ifndef PROCESSOR_ARCHITECTURE
PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
$(BANG)endif
!endif
!if defined(PROCESSOR_LEVEL)
$(BANG)ifndef PROCESSOR_LEVEL
PROCESSOR_LEVEL = $(PROCESSOR_LEVEL)
$(BANG)endif
!endif

|
!endif

-alpha-: nul
	@$(APPEND) !ifndef PROCESSOR_ARCHITECTURE
	@$(APPEND) PROCESSOR_ARCHITECTURE = alpha
	@$(APPEND) !endif
-ix86-: nul
	@$(APPEND) !ifndef PROCESSOR_ARCHITECTURE
	@$(APPEND) PROCESSOR_ARCHITECTURE = x86
	@$(APPEND) !endif

-i386-: -ix86-
	@$(APPEND) !ifndef PROCESSOR_LEVEL
	@$(APPEND) PROCESSOR_LEVEL = 3
	@$(APPEND) !endif
-i486-: -ix86-
	@$(APPEND) !ifndef PROCESSOR_LEVEL
	@$(APPEND) PROCESSOR_LEVEL = 4
	@$(APPEND) !endif
-i586-: -ix86-
	@$(APPEND) !ifndef PROCESSOR_LEVEL
	@$(APPEND) PROCESSOR_LEVEL = 5
	@$(APPEND) !endif
-i686-: -ix86-
	@$(APPEND) !ifndef PROCESSOR_LEVEL
	@$(APPEND) PROCESSOR_LEVEL = 6
	@$(APPEND) !endif

-epilogue-: nul
	@type >> $(MAKEFILE) &&|

\# OS = $(OS)
\# RT = $(RT)
\# RUBY_INSTALL_NAME = ruby
\# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
\# CFLAGS = -q $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
\# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\"
\# STACK = 0x2000000
\# LDFLAGS = -S:$$(STACK)
\# RFLAGS = $$(iconinc)
\# EXTLIBS = cw32.lib import32.lib user32.lib kernel32.lib
$(BANG)include $$(srcdir)bcc32/Makefile.sub
|
	@$(srcdir:/=\)\win32\rm.bat config.h config.status
	@echo type "`$(MAKE)'" to make ruby for $(OS).