68000: Application build files
authorAlan Cox <alan@linux.intel.com>
Tue, 18 Oct 2016 22:01:43 +0000 (23:01 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 18 Oct 2016 22:01:43 +0000 (23:01 +0100)
Applications/V7/cmd/Makefile.68000 [new file with mode: 0644]
Applications/V7/cmd/sh/Makefile.68000 [new file with mode: 0644]
Applications/V7/games/Makefile.68000 [new file with mode: 0644]
Applications/cave/Makefile.68000 [new file with mode: 0644]
Applications/games/Makefile.68000 [new file with mode: 0644]
Applications/util/Makefile.68000

diff --git a/Applications/V7/cmd/Makefile.68000 b/Applications/V7/cmd/Makefile.68000
new file mode 100644 (file)
index 0000000..a5a09ba
--- /dev/null
@@ -0,0 +1,43 @@
+PLATFORM = 68000
+CC = m68k-linux-gnu-gcc
+ASM = m68k-linux-gnu-as
+AR = m68k-linux-gnu-ar
+LINKER = m68k-linux-gnu-ld
+CFLAGS = -fno-strict-aliasing -fomit-frame-pointer -fno-builtin -Wall -m68000 -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
+.SUFFIXES: .c .o
+
+SRCS  = ac.c col.c dc.c diff.c makekey.c ptx.c sum.c wall.c
+SRCS += accton.c  comm.c   dd.c      diffh.c  mesg.c     rev.c    test.c
+SRCS += at.c      cron.c   deroff.c  join.c   newgrp.c   split.c  time.c
+SRCS += atrun.c   crypt.c  diff3.c   look.c   pr.c       su.c     tsort.c
+
+OBJS = $(SRCS:.c=.o)
+
+APPS = $(OBJS:.o=)
+
+all: $(APPS) size.report
+
+$(APPS): $(CRT0)
+
+$(APPS) $(APPSNS): %: %.o
+       $(LINKER) $^ -o $@.bin $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
+
+
+size.report: $(APPS)
+       ls -l $^ > $@
+
+clean:
+       rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report *.o
+
+rmbak:
+       rm -f *~ core
+
diff --git a/Applications/V7/cmd/sh/Makefile.68000 b/Applications/V7/cmd/sh/Makefile.68000
new file mode 100644 (file)
index 0000000..c8a5775
--- /dev/null
@@ -0,0 +1,46 @@
+PLATFORM = 68000
+CC = m68k-linux-gnu-gcc
+ASM = m68k-linux-gnu-as
+AR = m68k-linux-gnu-ar
+LINKER = m68k-linux-gnu-ld
+CFLAGS = -fno-strict-aliasing -fomit-frame-pointer -fno-builtin -Wall -m68000 -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
+.SUFFIXES: .c .o
+
+SRCS  = args.c blok.c builtin.c cmd.c ctype.c error.c expand.c fault.c io.c \
+        macro.c main.c msg.c name.c print.c service.c setbrk.c stak.c \
+        string.c word.c xec.c glob.c
+
+INCS  = brkincr.h ctype.h defs.h mac.h mode.h name.h stak.h sym.h timeout.h
+
+OBJS = $(SRCS:.c=.o)
+
+all: sh
+
+$(OBJS): $(INCS)
+
+OBJS = $(SRCS:.c=.o)
+
+$(OBJS): %.o : %.c
+       $(CC) -c $(CFLAGS) $(COPT) $<
+
+sh: $(CRT0) $(OBJS)
+       $(LINKER) $^ -o $@.bin $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
+
+size.report: $(APPS)
+       ls -l $^ > $@
+
+clean:
+       rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report *.o
+
+rmbak:
+       rm -f *~ core
+
diff --git a/Applications/V7/games/Makefile.68000 b/Applications/V7/games/Makefile.68000
new file mode 100644 (file)
index 0000000..2c2871a
--- /dev/null
@@ -0,0 +1,40 @@
+PLATFORM = 68000
+CC = m68k-linux-gnu-gcc
+ASM = m68k-linux-gnu-as
+AR = m68k-linux-gnu-ar
+LINKER = m68k-linux-gnu-ld
+CFLAGS = -fno-strict-aliasing -fomit-frame-pointer -fno-builtin -Wall -m68000 -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
+.SUFFIXES: .c .o
+
+SRCS  = arithmetic.c  backgammon.c  fish.c  wump.c
+
+OBJS = $(SRCS:.c=.o)
+
+APPS = $(OBJS:.o=)
+
+all: $(APPS) size.report
+
+$(APPS): $(CRT0)
+
+$(APPS) $(APPSNS): %: %.o
+       $(LINKER) $^ -o $@.bin $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
+
+
+size.report: $(APPS)
+       ls -l $^ > $@
+
+clean:
+       rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report
+
+rmbak:
+       rm -f *~ core
+
diff --git a/Applications/cave/Makefile.68000 b/Applications/cave/Makefile.68000
new file mode 100644 (file)
index 0000000..900239a
--- /dev/null
@@ -0,0 +1,43 @@
+PLATFORM = 68000
+CC = m68k-linux-gnu-gcc
+ASM = m68k-linux-gnu-as
+AR = m68k-linux-gnu-ar
+LINKER = m68k-linux-gnu-ld
+CFLAGS = -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
+.SUFFIXES: .c .o
+
+SRC = advent.c adventdb.c database.c english.c itverb.c lib.c saveadv.c \
+      turn.c verb.c
+
+OBJ = $(SRC:.c=.o)
+
+.SUFFIXES: .c .o
+
+all: advent advent.db
+
+advent.db: advgen
+       ./advgen -x > advent.db
+
+advgen: advgen.c
+       cc advgen.c -o ./advgen
+
+.c.o:
+       $(CC) $(CFLAGS) $(CCOPTS) -c $<
+
+advent: $(CRT0) $(OBJ)
+       $(LINKER) $^ -o $@.bin $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
+
+clean:
+       rm -f $(OBJS) $(OBJSNS) $(APPS) $(APPSNS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report *.o
+
+rmbak:
+       rm -f *~ core
diff --git a/Applications/games/Makefile.68000 b/Applications/games/Makefile.68000
new file mode 100644 (file)
index 0000000..785cbe5
--- /dev/null
@@ -0,0 +1,46 @@
+PLATFORM = 68000
+CC = m68k-linux-gnu-gcc
+ASM = m68k-linux-gnu-as
+AR = m68k-linux-gnu-ar
+LINKER = m68k-linux-gnu-ld
+CFLAGS = -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
+.SUFFIXES: .c .o
+
+SRCSNS = 
+
+SRCS  = adv01.c adv02.c adv03.c adv04.c adv05.c adv06.c adv07.c \
+        adv08.c adv09.c adv10.c adv11.c adv12.c adv13.c adv14a.c adv14b.c \
+        myst01.c myst02.c myst03.c myst04.c myst05.c myst06.c myst07.c \
+       myst08.c myst09.c myst10.c myst11.c fortune-gen.c qrun.c fortune.c
+
+OBJS = $(SRCS:.c=.o)
+OBJSNS = $(SRCSNS:.c=.o)
+
+APPS = $(OBJS:.o=)
+APPSNS = $(OBJSNS:.o=)
+
+all: $(APPS) $(APPSNS) size.report
+
+$(APPS): $(CRT0)
+$(APPSNS): $(CRT0NS)
+
+$(APPS) $(APPSNS): %: %.o
+       $(LINKER) $^ -o $@.bin $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
+
+size.report: $(APPS) $(APPSNS)
+       ls -l $^ > $@
+
+clean:
+       rm -f $(OBJS) $(OBJSNS) $(APPS) $(APPSNS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report
+
+rmbak:
+       rm -f *~ core
index 73c68d5..8af2355 100644 (file)
@@ -3,13 +3,15 @@ CC = m68k-linux-gnu-gcc
 ASM = m68k-linux-gnu-as
 AR = m68k-linux-gnu-ar
 LINKER = m68k-linux-gnu-ld
-CFLAGS = -I../../Library/include -I../../Library/include/68000
+CFLAGS = -fno-strict-aliasing -fomit-frame-pointer -fno-builtin -Wall -m68000 -I../../Library/include -I../../Library/include/68000
 LINKER_OPT = -L../../Library/libs -lc68000
 LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name))
-LINKER_OPT += -L$(LIBGCCDIR) -lgcc
+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
 .SUFFIXES: .c .o
 
 SRCSNS = \
@@ -129,16 +131,18 @@ $(APPSNS): $(CRT0NS)
 $(APPTC): $(CRT0)
 
 $(APPS) $(APPSNS): %: %.o
-       $(LINKER) $^ -o $@ $(LINKER_OPT)
+       $(LINKER) $^ -o $@.bin $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
 
 $(APPTC): %: %.o
-       $(LINKER) $^ -o $@ -ltermcap68000 $(LINKER_OPT)
+       $(LINKER) $^ -o $@.bin -ltermcap68000 $(LINKER_OPT)
+       $(ELF2FUZIX) -o $@ $@.bin
 
 size.report: $(APPS) $(APPSNS)
        ls -l $^ > $@
 
 clean:
-       rm -f $(OBJS) $(OBJSNS) $(APPS) $(APPSNS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report
+       rm -f $(OBJS) $(OBJSNS) $(APPS) $(APPSNS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report *.o
 
 rmbak:
        rm -f *~ core