home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari FTP
/
ATARI_FTP_0693.zip
/
ATARI_FTP_0693
/
Mint
/
mntlib32.zoo
/
Makefile
< prev
next >
Wrap
Makefile
|
1993-06-17
|
3KB
|
187 lines
#
# Top level Makefile for MiNT-Gcc library
#
# GCC configuration info...
# Leave the next line undefined for native compilation setup.
#CROSSDIR := /net/acae127/home/bammi/atari/cross-gcc
# Define MINTFLAG if you want to use the "normal"
# gcc libraries, too
#MINTFLAG := -mint
ifdef MINTFLAG
MINTOPT := -mint
else
MINTOPT :=
endif
ifdef CROSSDIR
# Set up to do cross-compiling...
CROSSLIB := $(CROSSDIR)/lib
CROSSBIN := $(CROSSDIR)/bin
AR := $(CROSSBIN)/car
AS := cgcc $(MINTOPT)
CC := cgcc $(MINTOPT)
C++ := cgcc $(MINTOPT)
LIB := $(CROSSLIB)
VPATH := ../co
CP := cp
else
# Set up to run native...
AR := gcc-ar
AS := gcc $(MINTOPT)
CC := gcc $(MINTOPT)
C++ := gcc $(MINTOPT)
LIB := c:\gnu\lib
CP := mv
endif
ifdef ENTROPY
# This reflects my setup, your mileage may vary.
ifndef CROSSDIR
AR := ar
LIB := /src/newlib
else
MINTFLAG := -mint
MINTOPT := $(MINTFLAG)
XPFLAGS := -nostdinc -I../minclude
XFLAGS := $(XPFLAGS)
endif
endif
# Additional options for compiling C code
#XFLAGS := -I../co
# Dynamic selection of options for each target library...
ifneq (,$(findstring debug,$(TARGET)))
OPTIM= -O -g -Wstrict-prototypes
FRAME=
DEBUG=
g=g
else
OPTIM= -O2 -fstrength-reduce
FRAME= -fomit-frame-pointer
DEBUG= -DNDEBUG
g=
endif
ifneq (,$(findstring long-int,$(TARGET)))
SHORT=
DSHORT=
ST=
else
SHORT= -mshort
DSHORT= -DSHORTLIB
ST=16
endif
ifneq (,$(findstring 68020,$(TARGET)))
CC := $(CC) -m68020
endif
ifneq (,$(findstring baserel,$(TARGET)))
CC := $(CC) -mbaserel
b=b
else
b=
endif
# common subset of options; no int size or omit-frame-pointer:
COPTS= $(DEBUG) $(OPTIM) $(XFLAGS)
# Base options CC; includes int size but not omit-frame-pointer
CFFLAGS = $(SHORT) $(COPTS)
# normal CFLAGS including int size and omit-frame-pointer
CFLAGS= $(CFFLAGS) $(FRAME)
# cflags for stuff that needs to be compiled with 32 bit ints
CLFLAGS= $(COPTS) $(FRAME) $(DSHORT)
# flags to $(CC) when it runs the assembler only
ASFLAGS= -c
# flags to $(CC) when running preprocessor and assembler
PPFLAGS= $(XPFLAGS) $(SHORT) -P -c
# library targets
ifdef MINTFLAG
CLIB= $bmint$g$(ST).olb
CLIB020=$bmint$g$(ST)020.olb
IIOLIB= $bmiio$g$(ST).olb
CRT0=$bmcrt0.o
GCRT0=$bmgcrt0.o
else
CLIB= $bgnu$g$(ST).olb
CLIB020=$bgnu$g$(ST)020.olb
IIOLIB= $biio$g$(ST).olb
CRT0=$bcrt0.o
GCRT0=$bgcrt0.o
endif
STARTO= $(CRT0) $(GCRT0)
# the stuff to make
ALL= $(CLIB) $(IIOLIB) $(STARTO)
ALL020 = $(CLIB020) $(STARTO)
top: lshort llong lbshort lblong
#all: lshort llong lbshort lblong lgshort lglong
lshort:
$(MAKE) clean
$(MAKE) install
llong:
$(MAKE) clean
$(MAKE) install TARGET=long-int
lgshort:
$(MAKE) clean
$(MAKE) install TARGET=debug
lglong:
$(MAKE) clean
$(MAKE) install TARGET="long-int debug"
l020short:
$(MAKE) clean
$(MAKE) install020 TARGET=68020
l020long:
$(MAKE) clean
$(MAKE) install020 TARGET="68020 long-int"
lbshort:
$(MAKE) clean
$(MAKE) install TARGET="baserel"
lblong:
$(MAKE) clean
$(MAKE) install TARGET="long-int baserel"
realclean:
rm -f *.o *.olb *~ *#
rm -f core report nohup.out
distclean: realclean
# Get the rules to build everything...
include mincl