2 ## $Id: config.mk,v 1.1 2000/01/12 20:34:26 bernie Exp $
4 ## Build environment configuration parameters
5 ## Copyright (C) 1999 by B. Innocenti & M. Cavalleri
8 ###########################################################
9 # Package configuration
10 ###########################################################
12 # CPU to compile for (eg: "68020").
16 # Compiler to use. Possible options are:
17 # sc - SAS/C 6.58 or better
18 # gcc - gcc 2.7.2 or EGCS 1.1b
19 # vbcc - Not yet supported
20 # stormc - Not yet supported
24 # Additional include directories (e.g.: system headers)
26 C_INCLUDE_PATH := -I/gg/include -I/include
28 # compiling options: set this variable to
29 # 0 to link the demo programs with the standard
30 # startup libraries, se to other values to
31 # link to obj/app_startup.o
36 ###########################################################
37 # Tools used in the Makefiles
38 ###########################################################
42 FLUSHLIBS := Avail FLUSH >NIL:
43 MAKEINFO := GG:bin/makeinfo
44 FD2PRAGMA := fd2pragma
45 HUNK2AOUT := hunk2aout
47 ARCHIVER := LZX -3 -e -r a
50 ###########################################################
51 # Compiler, linker and assembler flags
52 ###########################################################
56 ifeq ($(strip $(COMPILER)),sc)
58 APP_STARTUP_SRC := $(TOP)/common/startup_sc.s
69 # GST usage must sometimes be disabled due to bugs in SAS/C 6.58
70 GST := $(OBJDIR)/$(PROJNAME).gst
72 # Note: Using the "STRCONST" compiler option requires
73 # patched versions of the OS headers to work correctly
77 OPT_CFLAGS := OPTIMIZE OPTTIME OPTSCHEDULER OPTINLINELOCAL \
78 OPTRDEPTH=4 OPTDEPTH=4 OPTCOMP=8 DATA=NEAR CODE=NEAR
79 DBG_CFLAGS := NOOPTIMIZE DEBUG=FULLFLUSH ONERROR=CONTINUE CODE=FAR \
81 CMN_CFLAGS := PARAMS=REGISTERS STRMERGE AFP UTILLIB INCDIR=$(INCDIR) \
82 NOSTKCHK NOCHKABORT NOICONS STRSECT=CODE GST $(GST) CPU=$(CPU)
86 OPT_SFLAGS := SMALLDATA SMALLCODE ALIGN MACHINE=$(CPU) OPT !
87 DBG_SFLAGS := SYMDEBUG LINEDEBUG SET "_DEBUG=1"
88 CMN_SFLAGS := INCPATH=INCLUDE:,$(INCDIR) NOEXE QUIET
92 # Use the utility.library for 32bit multiplication and division.
94 # The C runtime library is never used but it's still needed because
95 # SAS/C sometimes generates code that referencess symbols such as
96 # _CXAMEMSET or _CXAMEMCPY
99 DBG_LFLAGS := NOSHORTRELOCS ADDSYM
100 CMN_LFLAGS := SMALLCODE SMALLDATA NOALVS NOICONS BATCH DEFINE \
101 "__CXM33=__UCXM33,__CXD33=__UCXD33,__CXM22=__UCXM22,__CXD22=__UCXD22"
104 DBG_LIBS := LIB:debug.lib LIB:small.lib
105 CMN_LIBS := LIB:sc.lib
113 # Additional flags for SAS/C GST support
115 ifneq ($(strip $(GST)),)
116 CMN_CFLAGS += GST=$(GST)
121 # Flags for gcc or egcs
123 ifeq ($(strip $(COMPILER)),gcc)
125 APP_STARTUP_SRC := $(TOP)/common/startup_gcc.s
131 LDNOLIB := gcc -nostartfiles -noixemul
139 # if you have some custom include directory we suggest you to
140 # use the variable C_INCLUDE_PATH instead of adding it to
141 # the directories list below via tha argument -I
143 OPT_CFLAGS := -O2 -msmall-code -fomit-frame-pointer -mregparm -funroll-loops \
144 -finline-functions -fno-implement-inlines
145 DBG_CFLAGS := -D_DEBUG=1 -g
146 CMN_CFLAGS := -m$(CPU) -Wundef -Wimplicit -Winline -Wreturn-type \
147 -I$(TOP)/include/ $(C_INCLUDE_PATH)
149 # assembler flags (for PhxAss, not as. these are needed
150 # to compile the library startup code).
152 OPT_SFLAGS := SMALLDATA SMALLCODE ALIGN MACHINE=$(CPU) OPT !
153 DBG_SFLAGS := SYMDEBUG LINEDEBUG SET "DEBUG"
154 CMN_SFLAGS := INCPATH=INCLUDE:,$(INCDIR) NOEXE QUIET
163 DBG_LIBS := -lamiga_debug
175 ###########################################################
176 ###########################################################
177 # You shouldn't need to modify anything below this line
178 ###########################################################
179 ###########################################################
183 # distribution version is compiled with these flags
185 O_CFLAGS := $(CMN_CFLAGS) $(OPT_CFLAGS)
186 O_SFLAGS := $(CMN_SFLAGS) $(OPT_SFLAGS)
187 O_LFLAGS := $(CMN_LFLAGS) $(OPT_LFLAGS)
188 O_LIBS := $(CMN_LIBS) $(OPT_LIBS)
191 # debug version is compiled with these flags
193 D_CFLAGS := $(CMN_CFLAGS) $(DBG_CFLAGS)
194 D_SFLAGS := $(CMN_SFLAGS) $(DBG_SFLAGS)
195 D_LFLAGS := $(CMN_LFLAGS) $(DBG_LFLAGS)
196 D_LIBS := $(CMN_LIBS) $(DBG_LIBS)
199 ###########################################################
201 ###########################################################
204 INCDIR := $(TOP)/include
205 PREFIX := $(TOP)/dist
207 PROJNAME := OpenBoopsi
208 ARCNAME := $(PREFIX)/$(PROJNAME).lzx
209 SRCARCNAME := $(PREFIX)/$(PROJNAME)_src.lzx
211 # APP_STARTUP_SRC is defined in the
212 # compiler specific sections
214 APP_STARTUP := $(OBJDIR)/app_startup.o