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 # Linux version for GNU C/C++.
31 #############################################################################
33 # Include standard startup script definitions
35 .INCLUDE: "$(SCITECH)/makedefs/startup.mk"
37 # Import enivornment variables that we use
38 .IMPORT .IGNORE : GCC2_LIBBASE
40 # Override some file suffix definitions
44 # Override the file prefix/suffix definitions for library naming.
45 LP := lib # LP - Library file prefix (name of file on disk)
46 LL := -l # Library link prefix (name of library on link command line)
47 LE := # Library link suffix (extension of library on link command line)
49 # We are compiling for a 32 bit envionment
52 # Define that we are compiling for Linux
55 # Default commands for compiling, assembling linking and archiving.
57 CFLAGS := -Wall -I. -Iinclude -I$(SCITECH:s,\,/)/include -I$(PRIVATE:s,\,/)/include
61 ASFLAGS := -t -f elf -d__FLAT__ -d__GNUC__ -iinclude -i$(SCITECH)/include -d__NOU__
62 SHOW_ASFLAGS := -f elf
72 # Optionally turn on debugging information
77 # NASM does not support debugging information yet
81 # Optionally turn on optimisations
93 # Optionally turn on direct i387 FPU instructions
99 # Optionally compile a beta release version of a product
102 SHOW_CFLAGS += -DBETA
104 SHOW_ASFLAGS += -dBETA
107 # Disable standard C runtime library
110 CFLAGS += -fno-builtin -nostdinc
113 # Compile flag for whether to build X11 or non-X11 lib
118 # Target environment dependant flags
119 CFLAGS += -D__LINUX__
120 ASFLAGS += -d__LINUX__ -d__UNIX__
122 # Define the base directory for library files
125 LIB_BASE_DIR := $(SCITECH_LIB)/lib/debug
126 CFLAGS += -DCHECKED=1
127 SHOW_CFLAGS += -DCHECKED=1
129 LIB_BASE_DIR := $(SCITECH_LIB)/lib/release
132 # Define where to install library files
134 LIB_DEST_SHARED := $(LIB_BASE_DIR)/linux/gcc/libc.so
135 LIB_DEST_STATIC := $(LIB_BASE_DIR)/linux/gcc/libc
137 LIB_DEST_SHARED := $(LIB_BASE_DIR)/linux/gcc/glibc.so
138 LIB_DEST_STATIC := $(LIB_BASE_DIR)/linux/gcc/glibc
141 # Link to static libraries if requested
142 .IF $(STATIC_LIBS_ALL)
147 # Link to static libraries if requested
149 LDFLAGS += -L$(LIB_DEST_STATIC)
151 LDFLAGS += -L$(LIB_DEST_SHARED) -L$(LIB_DEST_STATIC)
154 # Optionally enable some dynamic libraries to be built
161 VERSION := $(VERSIONMAJ).$(VERSIONMIN)
168 SHOW_ASFLAGS += -D__PIC__
169 LIB_DEST := $(LIB_DEST_SHARED)
171 LIB_DEST := $(LIB_DEST_STATIC)
174 # Place to look for PMODE library files
178 # Define which file contains our rules
180 RULES_MAK := gcc_linux.mk