From: Alan Cox Date: Tue, 18 Apr 2017 20:56:20 +0000 (+0100) Subject: levee: Add 68K build X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f09d41f15aeb4d1707a8c0d23a9ccbdc24b0db15;p=FUZIX.git levee: Add 68K build We should tune the defines but we'll get to that later --- diff --git a/Applications/levee/Makefile.68000 b/Applications/levee/Makefile.68000 new file mode 100644 index 00000000..4ee12ea7 --- /dev/null +++ b/Applications/levee/Makefile.68000 @@ -0,0 +1,52 @@ +PLATFORM = 68000 +CC = m68k-uclinux-gcc +ASM = m68k-uclinux-as +AR = m68k-uclinux-ar +LINKER = m68k-uclinux-ld +CFLAGS = -fno-strict-aliasing -fomit-frame-pointer -fno-builtin -msoft-float -Wall -m68000 -Os -I../../Library/include -I../../Library/include/68000 +LINKER_OPT = -L../../Library/libs -lc68000 +LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name)) +LINKER_OPT += --emit-relocs -L$(LIBGCCDIR) -lgcc -T ../../Library/elf2flt.ld +CRT0 = ../../Library/libs/crt0_68000.o +CRT0NS = ../../Library/libs/crt0nostdio_68000.o +# For now while we get going. Really we want to use some kind of elf2zmagic +# with relocs. +ELF2FUZIX = elf2flt +# 3 sets of objects co-exist: _l -> linux (host) _v -> vt52 _a -> ansi +.SUFFIXES: .c .o-l .o-v .o-a + +CSRCS = beep.c blockio.c display.c doscall.c editcor.c exec.c find.c +CSRCS += flexcall.c gemcall.c globals.c insert.c main.c misc.c modify.c +CSRCS += move.c rmxcall.c ucsd.c undo.c unixcall.c wildargs.c +HDRS = extern.h grep.h levee.h proto.h + +OBJSL = $(CSRCS:.c=.o-l) +OBJSA = $(CSRCS:.c=.o-a) +OBJSV = $(CSRCS:.c=.o-v) + +all: levee-l levee-a levee-v + +# Linux version to run on Host system for debug purposes +levee-l: $(OBJSL) + gcc -o levee-linux $(OBJSL) + +levee-a: $(OBJSA) + $(LINKER) -o levee-ansi $(CRT0) $(OBJSA) $(LINKER_OPT) + +levee-v: $(OBJSV) $(CRT0) + $(LINKER) -o levee-vt52 $(CRT0) $(OBJSV) $(LINKER_OPT) + +# Build for Linux - assume appropriate host tools exist with default names +$(OBJSL): %.o-l: %.c $(HDRS) + gcc -O3 -c -DVT52=0 -DANSI=1 -o $*.o-l $*.c + +## need to change include file and add appropriate -D -- and to z80 version, too + +$(OBJSA): %.o-a: %.c $(HDRS) + $(CC) $(CFLAGS) $(COPT) -c -DVT52=0 -DANSI=1 -o $*.o-a $*.c + +$(OBJSV): %.o-v: %.c $(HDRS) + $(CC) $(CFLAGS) $(COPT) -c -DVT52=1 -DANSI=0 -o $*.o-v $*.c + +clean: + rm -rf $(OBJS) $(OBJSL) $(OBJSA) $(OBJSV) *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *~ *.o *.rel *.asm levee levee.bin