source: trunk/include/makefile.mif@ 184

Last change on this file since 184 was 184, checked in by Ben Rietbroek, 8 years ago

Added 'CRC_IGNORE' option for debug building [v1.1.1-testing]

The CRC is calculated and inserted in the loader image when AiR-BOOT is
installed. Ignoring the CRC enables manually merging the loader without
using the installer. This is used for debugging in virtual machines,
where it is easy to merge the loader to the disk image of the VM.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File size: 4.8 KB
Line 
1###############################################################################
2# makefile.mif :: Make Include File -- Defines Cross Platform Stuff. [wmake] #
3###############################################################################
4
5#
6# This file can be included by Open Watcom Makefiles.
7# It tests several conditions and defines macros to build
8# under DOS, OS/2, Win32 and Linux.
9#
10
11
12#
13# The below does not work because the other make-utility *still* processes
14# stuff outside the !ifndef and barks on wmake specific constructs.
15# This essentially disables forwarding for these other make utils.
16# So we prohibit their use altogether.
17#
18#!ifndef __MAKEFILES__
19#front-end:
20# @echo Invoking WMake for $(MAKE)
21# @wmake
22# @echo.
23# @echo == Other Make Utility "$(MAKE)" used, please use "wmake" ==
24# @echo.
25#!endif
26#
27
28#
29# Prohibit processing with other Make Utilities.
30# Because WMake expands $(MAKE) to a full path-name, we cannot use it to
31# to string-compare it to "wmake". So we assume the __MAKEFILES__ macro
32# is unique to WMake. If it's not defined it must be a non-WMake utility.
33# GNU Make is not in the list below because it first looks for GNUmakefile.
34# Where a Makefile is used, a special GNUmakefile is present that forwards
35# to WMake, including selective targets.
36#
37!ifndef __MAKEFILES__
38ERR_NOT_WMAKE=Please use Open Watcom "wmake"
39 # Borland make
40! if "$(MAKE)"=="MAKE"
41! error (make): $(ERR_NOT_WMAKE).
42! endif
43! if "$(MAKE)"=="BMAKE"
44! error (make): $(ERR_NOT_WMAKE).
45! endif
46 # VisualAge v3 nmake and MS nmake
47! if "$(MAKE)"=="nmake"
48! error (nmake): $(ERR_NOT_WMAKE).
49! endif
50! if "$(MAKE)"=="Nmake"
51! error (nmake): $(ERR_NOT_WMAKE).
52! endif
53! if "$(MAKE)"=="NMake"
54! error (nmake): $(ERR_NOT_WMAKE).
55! endif
56! if "$(MAKE)"=="NMAKE"
57! error (nmake): $(ERR_NOT_WMAKE).
58! endif
59 # OS/2 ToolKit v4.5 nmake32
60! if "$(MAKE)"=="nmake32"
61! error ERROR (nmake32): $(ERR_NOT_WMAKE).
62! endif
63! if "$(MAKE)"=="Nmake32"
64! error ERROR (nmake32): $(ERR_NOT_WMAKE).
65! endif
66! if "$(MAKE)"=="NMake32"
67! error ERROR (nmake32): $(ERR_NOT_WMAKE).
68! endif
69! if "$(MAKE)"=="NMAKE32"
70! error ERROR (nmake32): $(ERR_NOT_WMAKE).
71 # Unknown Make Utility (like a renamed one)
72! else
73! error ERR: $(ERR_NOT_WMAKE).
74! endif
75!endif
76
77
78
79
80# ===============================
81# == From here we're "WMaking" ==
82# ===============================
83
84#
85# The first thing we need is the Open Watcom tool-chain.
86#
87!ifndef %WATCOM
88! error No WATCOM Environment Variable set !
89!endif
90
91#
92# Messages.
93#
94MSG_SUCCESS=has been built successfully !
95
96#
97# Warnings.
98#
99WARN_DOS_BLD_ENV=Warning: The DOS build-environment has limited functionality !
100WARN_OVERLAP_NOT_SUPPORTED=Warning: Overlap Checking not supported for assembler: "$(ASM)" !
101
102#
103# Variables defined here will be placed into the environment
104# and are available in spawned Makefiles or Scripts.
105#
106%ZVAR=This variable will be placed in the Environment
107
108#
109# Set the '*UNKNOWN*' value for Vendor and BuildMachine if undefined or empty
110#
111!if "$(%BLDLVL_VENDOR)"==""
112%BLDLVL_VENDOR=*UNKNOWN*
113!endif
114!if "$(%BLDLVL_MACHINE)"==""
115%BLDLVL_MACHINE=*UNKNOWN*
116!endif
117
118#
119# Compose JWasm defines to pass on command-line
120#
121%JWASM_DEFINES=
122%JWASM_DEFINES += -DBLDLVL_VENDOR="'$(%BLDLVL_VENDOR)'"
123%JWASM_DEFINES += -DBLDLVL_MACHINE="'$(%BLDLVL_MACHINE)'"
124
125#
126# Disable code CRC-check -- used for debugging
127#
128!if "$(%CRC_IGNORE)"=="y"
129%JWASM_DEFINES += -DCRC_IGNORE
130!endif
131
132#
133# Compose C-Compiler defines to pass on command-line
134#
135%CC_DEFINES=
136!ifdef __LINUX__
137%CC_DEFINES += -dBLDLVL_VENDOR='"$(%BLDLVL_VENDOR)"'
138%CC_DEFINES += -dBLDLVL_MACHINE='"$(%BLDLVL_MACHINE)"'
139!else
140%CC_DEFINES += -dBLDLVL_VENDOR="$(%BLDLVL_VENDOR)"
141%CC_DEFINES += -dBLDLVL_MACHINE="$(%BLDLVL_MACHINE)"
142!endif
143
144#
145# Define how a spawning shell is invoked.
146#
147DOSSHELL = COMMAND.COM /c
148OS2SHELL = CMD.EXE /c
149WINSHELL = CMD.EXE /c
150LINSHELL = bash -c
151
152#
153# WMake is invoked under DOS.
154#
155!ifdef __MSDOS__
156LP = aap noot mies
157LS = dir
158CP = copy
159MV = ren
160RM = del
161STRIP = wstrip
162DS = \
163PS = ;
164NULDEV = nul:
165BS = _build.bat
166SHELL = $(DOSSHELL)
167!endif
168
169#
170# WMake is invoked under OS/2.
171#
172!ifdef __OS2__
173LP = wim zus jet
174LS = dir
175CP = copy
176MV = ren
177RM = del
178STRIP = wstrip
179DS = \
180PS = ;
181NULDEV = nul:
182BS = _build.cmd
183SHELL = $(OS2SHELL)
184!endif
185
186#
187# WMake is invoked under Win32.
188#
189!ifdef __NT__
190LP = teun vuur gijs
191LS = dir
192CP = copy
193MV = ren
194RM = del
195STRIP = wstrip
196DS = \
197PS = ;
198NULDEV = nul:
199BS = _build.cmd
200SHELL = $(WINSHELL)
201!endif
202
203#
204# WMake is invoked under Linux.
205#
206!ifdef __LINUX__
207LP = lam kees bok
208LS = 'ls -1'
209CP = cp -a
210MV = mv
211RM = rm
212STRIP = strip
213DS = /
214PS = :
215NULDEV = /dev/null
216BS = _build.bash
217SHELL = $(LINSHELL)
218%TEMP = /var/tmp
219!endif
220
Note: See TracBrowser for help on using the repository browser.