1 #############################################################################
3 # SciTech Multi-platform Graphics Library
5 # ========================================================================
7 # The contents of this file are subject to the SciTech MGL Public
8 # License Version 1.0 (the "License"); you may not use this file
9 # except in compliance with the License. You may obtain a copy of
10 # the License at http://www.scitechsoft.com/mgl-license.txt
12 # Software distributed under the License is distributed on an
13 # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14 # implied. See the License for the specific language governing
15 # rights and limitations under the License.
17 # The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
19 # The Initial Developer of the Original Code is SciTech Software, Inc.
20 # All Rights Reserved.
22 # ========================================================================
24 # Descripton: Generic DMAKE startup makefile definitions file. Assumes
25 # that the SCITECH environment variable has been set to point
26 # to where all our stuff is installed. You should not need
27 # to change anything in this file.
29 # OS/2 version for EMX/GNU C/C++.
31 #############################################################################
33 # Include standard startup script definitions
35 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
37 # Disable warnings for macros redefined here that were given
38 # on the command line.
39 __.SILENT := $(.SILENT)
42 # Import enivornment variables that we use common to all compilers
43 .IMPORT .IGNORE : TEMP SHELL INCLUDE LIB SCITECH PRIVATE SCITECH_LIB
44 .IMPORT .IGNORE : DBG OPT OPT_SIZE CRTDLL SHW BETA CHECKED NO_EXCEPT NO_RTTI
45 .IMPORT .IGNORE : FULLSCREEN SHOW_ARGS
48 # Standard file suffix definitions
50 E := .exe # Executables
52 A := .asm # Assembler sources
53 S := .s # GNU assembler sources
54 P := .cpp # C++ sources
56 # File prefix/suffix definitions. The following prefixes are defined, and are
57 # used primarily to abstract between the Unix style libXX.a naming convention
58 # and the DOS/Windows/OS2 naming convention of XX.lib.
59 LP := # LP - Library file prefix (name of file on disk)
60 LL := -l # Library link prefix (name of library on link command line)
61 LE := # Library link suffix (extension of library on link command line)
63 # Import enivornment variables that we use
64 .IMPORT .IGNORE : EMX_LIBBASE USE_OS232 USE_OS2GUI
66 # We are compiling for a 32 bit envionment
69 # DMAKE uses this recipe to remove intermediate targets
70 .REMOVE :; $(RM) -f $<
72 # Turn warnings back to previous setting.
73 .SILENT := $(__.SILENT)
75 # We dont use TABS in our makefiles
78 # Default commands for compiling, assembling linking and archiving.
80 CFLAGS := -Zmt -Zomf -Wall -I. -I$(INCLUDE)
81 CXX := gcc -x c++ -fno-exceptions -fno-rtti
84 ASFLAGS := -t -f obj -F null -d__FLAT__ -d__NOU__ -iINCLUDE -i$(SCITECH)\INCLUDE
86 AS := tasm # Assembler and flags
87 ASFLAGS := /t /mx /m /oi /D__FLAT__ /D__NOU__ /iINCLUDE /i$(SCITECH)\INCLUDE
91 LDFLAGS := -L. -Zomf -Zmt
99 # Optionally turn off exceptions and RTTI for C++ code
101 CXX += -fno-exceptions
107 # Optionally turn on debugging information
111 # Without -s, emx always runs LINK386 with the /DEBUG option
114 # NASM does not support debugging information yet
118 # Optionally turn on optimisations
122 CFLAGS += -O3 -fomit-frame-pointer
127 # Optionally turn on direct i387 FPU instructions
133 # Optionally compile a beta release version of a product
139 # Disable standard C runtime library
141 CFLAGS += -fno-builtin -nostdinc
144 # Link against EMX DLLs (CRTDLL=1) or link with static C runtime libraries
152 # Target environment dependant flags
153 CFLAGS += -D__OS2_32__
157 # Define the base directory for library files
160 LIB_BASE_DIR := $(SCITECH_LIB)/lib/debug
161 CFLAGS += -DCHECKED=1
163 LIB_BASE_DIR := $(SCITECH_LIB)/lib/release
166 # Define where to install library files
167 LIB_DEST := $(LIB_BASE_DIR)\OS232\$(EMX_LIBBASE)
168 LDFLAGS += -L$(LIB_DEST)
170 # Build 32-bit OS/2 apps
172 CFLAGS += -Zdll -DBUILD_DLL
174 ASFLAGS += -dBUILD_DLL
177 CFLAGS += -D__OS2_PM__
178 LDFLAGS += -Zlinker /PMTYPE:PM
181 LDFLAGS += -Zlinker /PMTYPE:NOVIO
183 LDFLAGS += -Zlinker /PMTYPE:VIO
188 # Place to look for PMODE library files
192 # Define which file contains our rules