From 1331c374428c370667a1cf69674a0a62f3c22633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Wed, 9 Sep 2015 09:29:54 +0200 Subject: [PATCH] Examples for compiling AmigaOS libraries & devices. --- examples/.gitignore | 2 ++ examples/Makefile | 19 ++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/.gitignore b/examples/.gitignore index 60fb617..3fff634 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -2,3 +2,5 @@ !*.* *~ *.o +*.device +*.library diff --git a/examples/Makefile b/examples/Makefile index b5959b5..33bee0f 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -3,8 +3,8 @@ CXX = m68k-amigaos-g++ -noixemul -s CFLAGS = -Os -Wall -fomit-frame-pointer CXXFLAGS = -Os -Wall -fomit-frame-pointer -BINS = hello-ks13 hello-ks20 hello-stdio hello-iostream hello-mui test-mmu -OBJS = simple-device.o simple-library.o +BINS = hello-ks13 hello-ks20 hello-stdio hello-iostream hello-mui test-mmu \ + simple.library simple.r.library simple.device all: $(BINS) $(OBJS) @@ -36,17 +36,14 @@ simple-device.o: simple-device.c simple-library.o: CC += -fbaserel simple-library.o: simple-library.c -# normal library -lib: CC = m68k-amigaos-gcc -nostdlib -fbaserel -lib: libinit.o simple-library.o +simple.library: simple-library.o + $(CC) -fbaserel -amiga-lib $(CFLAGS) -o $@ $^ -# multibase library -libr: CC = m68k-amigaos-gcc -nostdlib -fbaserel -libr: libinitr.o simple-library.o +simple.r.library: simple-library.o + $(CC) -fbaserel -amiga-libr $(CFLAGS) -o $@ $^ -# device -dev: CC = m68k-amigaos-gcc -nostdlib -fbaserel -dev: devinit.o simple-device.o +simple.device: simple-device.o + $(CC) -fbaserel -amiga-dev $(CFLAGS) -o $@ $^ clean: rm -f $(BINS)