From 465d8cf7b76ee3800ca9f88ad4bdcf8193be37b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Tue, 8 Sep 2015 10:28:55 +0200 Subject: [PATCH] Add some tests. --- examples/Makefile | 26 ++++++++++++++++++++------ examples/hello-iostream.cpp | 7 +++++++ examples/hello-ks13 | Bin 0 -> 472 bytes examples/{hello.c => hello-ks13.c} | 0 examples/hello-ks20.c | 6 ++++++ examples/hello-stdio.c | 7 +++++++ 6 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 examples/hello-iostream.cpp create mode 100755 examples/hello-ks13 rename examples/{hello.c => hello-ks13.c} (100%) create mode 100644 examples/hello-ks20.c create mode 100644 examples/hello-stdio.c diff --git a/examples/Makefile b/examples/Makefile index 8ee4357..28beb5d 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,12 +1,26 @@ CC = m68k-amigaos-gcc -noixemul -s +CXX = m68k-amigaos-g++ -noixemul -s CFLAGS = -Os -Wall -fomit-frame-pointer +CXXFLAGS = -Os -Wall -fomit-frame-pointer -all: hello hello-mui test-mmu +BINS = hello-ks13 hello-ks20 hello-stdio hello-mui test-mmu -hello: CC += -fbaserel -hello: CFLAGS += -m68000 -msmall-code -hello: LDLIBS = -lnix13 -hello: hello.c +all: $(BINS) + +hello-ks13: CC += -fbaserel +hello-ks13: CFLAGS += -m68000 -msmall-code +hello-ks13: LDLIBS = -lnix13 +hello-ks13: hello-ks13.c + +hello-ks20: CC += -fbaserel +hello-ks20: CFLAGS += -m68000 -msmall-code +hello-ks20: hello-ks20.c + +hello-stdio: CFLAGS += -m68020 +hello-stdio: hello-stdio.c + +hello-iostream: CXXFLAGS += -m68020 +hello-iostream: hello-iostream.cpp hello-mui: CC += -fbaserel hello-mui: CFLAGS += -m68020 -msmall-code @@ -18,5 +32,5 @@ test-mmu: CFLAGS += -m68060 -msmall-code test-mmu: test-mmu.c clean: - rm -f hello hello-mui test-mmu + rm -f $(BINS) rm -f *.o *~ diff --git a/examples/hello-iostream.cpp b/examples/hello-iostream.cpp new file mode 100644 index 0000000..05d4191 --- /dev/null +++ b/examples/hello-iostream.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + std::cout << "hello world!" << std::endl; + return 0; +} diff --git a/examples/hello-ks13 b/examples/hello-ks13 new file mode 100755 index 0000000000000000000000000000000000000000..986b1667469a3ca5b24dca4a18c9189117869500 GIT binary patch literal 472 zcmZQzVE)Vi0ZdSu5lH(3u?PbL^Ggt0$p$2o$iQ$Yoy+-6gPYUL$i}o^njQ^qnhp(C zn*I$=Iu#5ontly-lTZ4s`*%yt!D}_cnluImF~`>oF+h<9DBS~8ujl%vK`O$l<~KkB7Pi1ZVUz;$L17HSXMh+8m_GsWD + +int main(int argc, char **argv) { + PutStr("Hello world!\n"); + return 0; +} diff --git a/examples/hello-stdio.c b/examples/hello-stdio.c new file mode 100644 index 0000000..9a1f87f --- /dev/null +++ b/examples/hello-stdio.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("hello world!\n"); + return 0; +}