1# Copyright (C) 1991, 2000 artofcode LLC. All rights reserved. 2# 3# This program is free software; you can redistribute it and/or modify it 4# under the terms of the GNU General Public License as published by the 5# Free Software Foundation; either version 2 of the License, or (at your 6# option) any later version. 7# 8# This program is distributed in the hope that it will be useful, but 9# WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11# General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License along 14# with this program; if not, write to the Free Software Foundation, Inc., 15# 59 Temple Place, Suite 330, Boston, MA, 02111-1307. 16 17 18# $Id: wccommon.mak,v 1.3.6.2.2.1 2003/01/17 00:49:05 giles Exp $ 19# wccommon.mak 20# Section of Watcom C/C++ makefile common to MS-DOS and MS Windows. 21# We strongly recommend that you read the Watcom section of Make.htm 22# before attempting to build Ghostscript with the Watcom compiler. 23 24# This file is used by watc.mak, watcwin.mak, and watclib.mak. 25# Those files supply the following parameters: 26# Configuration, public: 27# GS_LIB_DEFAULT, SEARCH_HERE_FIRST, GS_INIT, FEATURE_DEVS, 28# DEVICE_DEVS*, COMPILE_INITS, BAND_LIST_* 29# Configuration, internal, generic: 30# PLATFORM, MAKEFILE, AK, CC*, DEBUG, NOPRIVATE, CP_, RM_, RMN_ 31# Configuration, internal, specific to DOS/Windows: 32# TDEBUG, USE_ASM, ASM, 33# COMPDIR, LIBPATHS, 34# CPU_TYPE, FPU_TYPE 35 36# We want Unix-compatible behavior. This is part of it. 37 38.NOCHECK 39 40# Define additional extensions to keep `make' happy 41 42.EXTENSIONS: .be .z 43 44# Define the auxiliary program dependency. We don't use this. 45 46AK= 47 48# Note that built-in libpng and zlib aren't available. 49 50SHARE_JPEG=0 51SHARE_LIBPNG=0 52SHARE_ZLIB=0 53 54# Define the extensions for command, object, and executable files. 55 56NULL= 57 58C_= 59CMD=.bat 60D_=-D 61_D_=$(NULL)= 62_D= 63I_=-i= 64II=-i= 65_I= 66NO_OP=%null 67O_=-fo= 68OBJ=obj 69Q= 70RO_=$(O_) 71XE=.exe 72XEAUX=.exe 73 74# Define the executable and shell invocations. 75 76D=\\ 77 78EXP= 79SH= 80 81# Define generic commands. 82 83CP_=call $(GLSRCDIR)\cp.bat 84RM_=call $(GLSRCDIR)\rm.bat 85RMN_=call $(GLSRCDIR)\rm.bat 86 87# Define the arguments for genconf. 88 89# wmake interprets & as calling for background execution, and ^ fails on 90# Windows NT. 91CONFILES=-e ~ -p FILE~s~ps 92CONFLDTR=-ol 93 94# Define the names of the Watcom C files. 95# See the comments in watc.mak and watcwin.mak regarding WCVERSION. 96 97!ifeq WCVERSION 11.0 98# 11.0 is currently the same as 10.5. 99COMP=$(%WATCOM)\binw\wcc386 100LINK=$(%WATCOM)\binw\wlink 101STUB=$(%WATCOM)\binw\wstub.exe 102WRC=$(%WATCOM)\binw\wrc.exe 103!endif 104 105!ifeq WCVERSION 10.5 106COMP=$(%WATCOM)\binw\wcc386 107LINK=$(%WATCOM)\binw\wlink 108STUB=$(%WATCOM)\binw\wstub.exe 109WRC=$(%WATCOM)\binw\wrc.exe 110!endif 111 112!ifeq WCVERSION 10.0 113COMP=$(%WATCOM)\binb\wcc386 114LINK=$(%WATCOM)\bin\wlink 115STUB=$(%WATCOM)\binb\wstub.exe 116WRC=$(%WATCOM)\binb\wrc.exe 117!endif 118 119!ifeq WCVERSION 9.5 120COMP=$(%WATCOM)\bin\wcc386 121LINK=$(%WATCOM)\bin\wlinkp 122STUB=$(%WATCOM)\binb\wstub.exe 123WRC=$(%WATCOM)\binb\wrc.exe 124!endif 125 126# 95/NT Watcom compiler versions 127# 10.695 is 10.6 under Windows 95 or NT (32 bit hosted tools) 128!ifeq WCVERSION 10.695 129COMP=$(%WATCOM)\binnt\wcc386 130LINK=$(%WATCOM)\binnt\wlink 131STUB=$(%WATCOM)\binw\wstub.exe 132WRC=$(%WATCOM)\binnt\wrc.exe 133WAT32=1 134!endif 135 136# Defaults 137!ifndef COMP 138COMP=$(%WATCOM)\bin\wcc386p 139LINK=$(%WATCOM)\bin\wlinkp 140STUB=$(%WATCOM)\binb\wstub.exe 141WRC=$(%WATCOM)\binb\rc.exe 142!endif 143!ifndef WAT32 144WAT32=0 145!endif 146 147!ifeq WAT32 0 148INCDIRS=$(%WATCOM)\h 149!else 150INCDIRS=$(%WATCOM)\h;$(%WATCOM)\h\nt 151!endif 152WBIND=$(%WATCOM)\binb\wbind.exe 153 154# Define the generic compilation flags. 155 156!ifeq CPU_TYPE 586 157!ifeq FPU_TYPE 0 158FPU_TYPE=387 159!endif 160!else 161!ifeq CPU_TYPE 486 162!ifeq FPU_TYPE 0 163FPU_TYPE=387 164!endif 165!endif 166!endif 167 168!ifeq FPU_TYPE 387 169FPFLAGS=-fpi87 170!else 171!ifeq FPU_TYPE 287 172FPFLAGS=-fpi287 173!else 174!ifeq FPU_TYPE -1 175FPFLAGS=-fpc 176!else 177FPFLAGS=-fpi 178!endif 179!endif 180!endif 181 182INTASM= 183PCFBASM= 184 185# Define the generic compilation rules. 186 187.asm.obj: 188 $(ASM) $(ASMFLAGS) $<; 189 190# Make sure we get the right default target for make. 191 192dosdefault: default 193 $(NO_OP) 194 195# Define the compilation flags. 196 197# Privacy 198!ifneq NOPRIVATE 0 199CP=-dNOPRIVATE 200!else 201CP= 202!endif 203 204# Run-time debugging and stack checking 205!ifneq DEBUG 0 206CD=-dDEBUG 207CS= 208!else 209CD= 210CS=-oeilnt -s 211!endif 212 213# Debugger symbols 214!ifneq TDEBUG 0 215CT=-d2 216LCT=DEBUG ALL 217!else 218CT=-d1 219LCT=DEBUG LINES 220!endif 221 222GENOPT=$(CP) $(CD) $(CT) $(CS) 223 224CCOPT=-d+ -i=$(INCDIRS) -zq -zp8 -ei 225CCFLAGS=$(CCOPT) $(GENOPT) $(PLATOPT) $(FPFLAGS) $(CFLAGS) $(XCFLAGS) 226CC=$(COMP) -oi $(CCFLAGS) 227CCAUX=$(COMP) -oi $(CCOPT) $(FPFLAGS) 228CC_=$(CC) 229CC_D=$(CC) 230CC_INT=$(COMP) -oit $(CCFLAGS) 231CC_LEAF=$(CC_) -s 232CC_NO_WARN=$(CC_) 233