## ## $Id: config.mk,v 1.1 2000/01/12 20:34:26 bernie Exp $ ## ## Build environment configuration parameters ## Copyright (C) 1999 by B. Innocenti & M. Cavalleri ########################################################### # Package configuration ########################################################### # CPU to compile for (eg: "68020"). # CPU := 68020 # Compiler to use. Possible options are: # sc - SAS/C 6.58 or better # gcc - gcc 2.7.2 or EGCS 1.1b # vbcc - Not yet supported # stormc - Not yet supported # COMPILER := gcc # Additional include directories (e.g.: system headers) # C_INCLUDE_PATH := -I/gg/include -I/include # compiling options: set this variable to # 0 to link the demo programs with the standard # startup libraries, se to other values to # link to obj/app_startup.o # NOSTDLIB := 0 ########################################################### # Tools used in the Makefiles ########################################################### NOP := echo ECHO := echo FLUSHLIBS := Avail FLUSH >NIL: MAKEINFO := GG:bin/makeinfo FD2PRAGMA := fd2pragma HUNK2AOUT := hunk2aout FLEXCAT := FlexCat ARCHIVER := LZX -3 -e -r a ########################################################### # Compiler, linker and assembler flags ########################################################### # Flags for SAS/C # ifeq ($(strip $(COMPILER)),sc) APP_STARTUP_SRC := $(TOP)/common/startup_sc.s CC := sc AS := PhxAss ASM := $(AS) LD := PhxLnk LDNOLIB := PhxLnk CP := copy CLONE REN := rename RM := delete # GST usage must sometimes be disabled due to bugs in SAS/C 6.58 GST := $(OBJDIR)/$(PROJNAME).gst # Note: Using the "STRCONST" compiler option requires # patched versions of the OS headers to work correctly # compiler flags # OPT_CFLAGS := OPTIMIZE OPTTIME OPTSCHEDULER OPTINLINELOCAL \ OPTRDEPTH=4 OPTDEPTH=4 OPTCOMP=8 DATA=NEAR CODE=NEAR DBG_CFLAGS := NOOPTIMIZE DEBUG=FULLFLUSH ONERROR=CONTINUE CODE=FAR \ DATA=FAR DEF DEBUG=1 CMN_CFLAGS := PARAMS=REGISTERS STRMERGE AFP UTILLIB INCDIR=$(INCDIR) \ NOSTKCHK NOCHKABORT NOICONS STRSECT=CODE GST $(GST) CPU=$(CPU) # assembler flags # OPT_SFLAGS := SMALLDATA SMALLCODE ALIGN MACHINE=$(CPU) OPT ! DBG_SFLAGS := SYMDEBUG LINEDEBUG SET "_DEBUG=1" CMN_SFLAGS := INCPATH=INCLUDE:,$(INCDIR) NOEXE QUIET # linker flags # # Use the utility.library for 32bit multiplication and division. # # The C runtime library is never used but it's still needed because # SAS/C sometimes generates code that referencess symbols such as # _CXAMEMSET or _CXAMEMCPY # OPT_LFLAGS := NODEBUG DBG_LFLAGS := NOSHORTRELOCS ADDSYM CMN_LFLAGS := SMALLCODE SMALLDATA NOALVS NOICONS BATCH DEFINE \ "__CXM33=__UCXM33,__CXD33=__UCXD33,__CXM22=__UCXM22,__CXD22=__UCXD22" OPT_LIBS := DBG_LIBS := LIB:debug.lib LIB:small.lib CMN_LIBS := LIB:sc.lib # misc flags # TO := TO OBJ := NOLINK DEF := DEFINE # Additional flags for SAS/C GST support # ifneq ($(strip $(GST)),) CMN_CFLAGS += GST=$(GST) endif endif # # Flags for gcc or egcs # ifeq ($(strip $(COMPILER)),gcc) APP_STARTUP_SRC := $(TOP)/common/startup_gcc.s CC := gcc -c AS := as ASM := PhxAss LD := gcc -noixemul LDNOLIB := gcc -nostartfiles -noixemul CP := cp MV := mv REN := $(MV) RM := rm # compiler flags # # if you have some custom include directory we suggest you to # use the variable C_INCLUDE_PATH instead of adding it to # the directories list below via tha argument -I # OPT_CFLAGS := -O2 -msmall-code -fomit-frame-pointer -mregparm -funroll-loops \ -finline-functions -fno-implement-inlines DBG_CFLAGS := -D_DEBUG=1 -g CMN_CFLAGS := -m$(CPU) -Wundef -Wimplicit -Winline -Wreturn-type \ -I$(TOP)/include/ $(C_INCLUDE_PATH) # assembler flags (for PhxAss, not as. these are needed # to compile the library startup code). # OPT_SFLAGS := SMALLDATA SMALLCODE ALIGN MACHINE=$(CPU) OPT ! DBG_SFLAGS := SYMDEBUG LINEDEBUG SET "DEBUG" CMN_SFLAGS := INCPATH=INCLUDE:,$(INCDIR) NOEXE QUIET # linker flags # OPT_LFLAGS := -s DBG_LFLAGS := CMN_LFLAGS := OPT_LIBS := DBG_LIBS := -lamiga_debug CMN_LIBS := # misc flags # TO := -o OBJ := -c DEF := -D endif ########################################################### ########################################################### # You shouldn't need to modify anything below this line ########################################################### ########################################################### # distribution version is compiled with these flags # O_CFLAGS := $(CMN_CFLAGS) $(OPT_CFLAGS) O_SFLAGS := $(CMN_SFLAGS) $(OPT_SFLAGS) O_LFLAGS := $(CMN_LFLAGS) $(OPT_LFLAGS) O_LIBS := $(CMN_LIBS) $(OPT_LIBS) # debug version is compiled with these flags # D_CFLAGS := $(CMN_CFLAGS) $(DBG_CFLAGS) D_SFLAGS := $(CMN_SFLAGS) $(DBG_SFLAGS) D_LFLAGS := $(CMN_LFLAGS) $(DBG_LFLAGS) D_LIBS := $(CMN_LIBS) $(DBG_LIBS) ########################################################### # Paths ########################################################### OBJDIR := $(TOP)/obj INCDIR := $(TOP)/include PREFIX := $(TOP)/dist PROJNAME := OpenBoopsi ARCNAME := $(PREFIX)/$(PROJNAME).lzx SRCARCNAME := $(PREFIX)/$(PROJNAME)_src.lzx # APP_STARTUP_SRC is defined in the # compiler specific sections # APP_STARTUP := $(OBJDIR)/app_startup.o