summaryrefslogtreecommitdiff
path: root/Source/Applications/SampleApps
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-18 15:27:34 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-18 15:27:34 +0200
commit323e12f1f9ab33df15dcfed210e807561d98fa8c (patch)
tree7d76e6932d4a979a1f2bfafc94478b66b1479bbc /Source/Applications/SampleApps
parentbc2eccdd11c27029096fb3e891073503eb269e27 (diff)
downloadMelon-323e12f1f9ab33df15dcfed210e807561d98fa8c.tar.gz
Melon-323e12f1f9ab33df15dcfed210e807561d98fa8c.zip
Re-organized everything
Diffstat (limited to 'Source/Applications/SampleApps')
-rw-r--r--Source/Applications/SampleApps/Makefile20
-rwxr-xr-xSource/Applications/SampleApps/asmdemobin4725 -> 0 bytes
-rw-r--r--Source/Applications/SampleApps/cxxdemo.cpp10
3 files changed, 24 insertions, 6 deletions
diff --git a/Source/Applications/SampleApps/Makefile b/Source/Applications/SampleApps/Makefile
index 28dad49..6d12f3f 100644
--- a/Source/Applications/SampleApps/Makefile
+++ b/Source/Applications/SampleApps/Makefile
@@ -2,23 +2,31 @@
ASM = nasm
ASMFLAGS = -f elf
+
+CXX = g++
+CXXFLAGS = -nostartfiles -nostdlib -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Userland -D THIS_IS_MELON_USERLAND
+
LD = ld
LDFLAGS = --entry=start -Ttext=40000000
-Applications = asmdemo
+Applications = asmdemo cxxdemo
all: $(Applications)
echo "* Done with applications : $(Applications)"
rebuild: mrproper all
-%: %.o
- echo "* Linking $<..."
- $(LD) $(LDFLAGS) $< -o $@
+%: %.cpp
+ echo "* Compiling $<..."
+ $(CXX) $(CXXFLAGS) -c $< -o $@.o
+ echo "* Linking $@.o..."
+ $(LD) $(LDFLAGS) ../../Library/Melon.o $@.o -o $@
-%.o: %.asm
+%: %.asm
echo "* Compiling $<..."
- $(ASM) $(ASMFLAGS) -o $@ $<
+ $(ASM) $(ASMFLAGS) -o $@.o $<
+ echo "* Linking $@.o..."
+ $(LD) $(LDFLAGS) $@.o -o $@
clean:
echo "* Removing object files..."
diff --git a/Source/Applications/SampleApps/asmdemo b/Source/Applications/SampleApps/asmdemo
deleted file mode 100755
index 9e6822d..0000000
--- a/Source/Applications/SampleApps/asmdemo
+++ /dev/null
Binary files differ
diff --git a/Source/Applications/SampleApps/cxxdemo.cpp b/Source/Applications/SampleApps/cxxdemo.cpp
new file mode 100644
index 0000000..5d95d28
--- /dev/null
+++ b/Source/Applications/SampleApps/cxxdemo.cpp
@@ -0,0 +1,10 @@
+#include <Syscall/Syscall.wtf.h>
+#include <WChar.class.h>
+
+int main() {
+ for (char c = ' '; c <= 'z'; c++) {
+ syscall(0xFFFFFF02, (unsigned int)c);
+ putch(c);
+ }
+ putch('\n');
+}