GNU toolchain Makefile

This commit is contained in:
Markus Fröschle
2012-10-11 14:11:52 +00:00
parent 9cef699ea0
commit 1720443d6e

55
BaS_GNU/Makefile Normal file
View File

@@ -0,0 +1,55 @@
#
# Makefile for Firebee BaS
#
# requires the GNU toolchain
# either the m68k-atari-mint version which allows creating the binaries
#
# or
#
# the m68k-elf version which also allows to use gdb together with bdm tools for debugging
#
TCPREFIX=m68k-atari-mint-
CC=$(TCPREFIX)gcc
LD=$(TCPREFIX)ld
INCLUDE=-Iinclude
CFLAGS=-mcfv4e -Wno-multichar -O1 -fomit-frame-pointer
#CFLAGS=-mcfv4e -Wno-multichar -S -O3 -fomit-frame-pointer
SRCDIR=sources
EXEC=bas.hex
CSRCS= \
$(SRCDIR)/sysinit.c \
$(SRCDIR)/BaS.c \
$(SRCDIR)/sd_card.c \
$(SRCDIR)/last.c
ARCS= \
$(SRCDIR)/startcf.S \
$(SRCDIR)/mmu.S \
$(SRCDIR)/exceptions.S \
$(SRCDIR)/supervisor.S \
$(SRCDIR)/ewf.S \
$(SRCDIR)/illegal_instruction.S
COBJS=$(CSRCS:.c=.o)
AOBJS=$(ASRCS:.S=.o)
OBJS=$(COBJS) $(SOBJS)
all: $(EXEC)
$(EXEC): $(OBJS)
echo "generating executable"
clean:
rm $(EXEC) *.o
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDE) $<
.S.o:
$(CC) -c $(CFLAGS) $(INCLUDE) $<