source: trunk/INCLUDE/MAKEFILE.MIF@ 37

Last change on this file since 37 was 37, checked in by Ben Rietbroek, 12 years ago

Reworked Build Environment [2012-02-15]

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can DESTROY THE MBR on ALL ATTACHED DISKS!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE THESE COMMITS!!

Changes

o Reworked build environment
o Start made with coding FIXCODE in C
o Moved MBR protection image
o New overlap macro
o Protect type 0x35 from edit (user popup)
o Protect type 0x35 from adding to menu (user popup)
o More...
! No LVM Label change yet

Note

o Changed license to GPL v3

See file COPYING in trunk.

File size: 3.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 !
100
101#
102# Variables defined here will be placed into the environment
103# and are available in spawned Makefiles or Scripts.
104#
105%ZVAR=This variable will be placed in the Environment
106
107#
108# Define how a spawning shell is invoked.
109#
110DOSSHELL = COMMAND.COM /c
111OS2SHELL = CMD.EXE /c
112WINSHELL = CMD.EXE /c
113LINSHELL = bash -c
114
115#
116# WMake is invoked under DOS.
117#
118!ifdef __MSDOS__
119LP = aap noot mies
120LS = dir
121CP = copy
122MV = ren
123RM = del
124STRIP = wstrip
125DS = \
126PS = ;
127BS = _build.bat
128SHELL = $(DOSSHELL)
129!endif
130
131#
132# WMake is invoked under OS/2.
133#
134!ifdef __OS2__
135LP = wim zus jet
136LS = dir
137CP = copy
138MV = ren
139RM = del
140STRIP = wstrip
141DS = \
142PS = ;
143BS = _build.cmd
144SHELL = $(OS2SHELL)
145!endif
146
147#
148# WMake is invoked under Win32.
149#
150!ifdef __NT__
151LP = teun vuur gijs
152LS = dir
153CP = copy
154MV = ren
155RM = del
156STRIP = wstrip
157DS = \
158PS = ;
159BS = _build.cmd
160SHELL = $(WINSHELL)
161!endif
162
163#
164# WMake is invoked under Linux.
165#
166!ifdef __LINUX__
167LP = lam kees bok
168LS = 'ls -1'
169CP = cp -a
170MV = mv
171RM = rm
172STRIP = strip
173DS = /
174PS = :
175BS = _build.bash
176SHELL = $(LINSHELL)
177!endif
178
Note: See TracBrowser for help on using the repository browser.