summaryrefslogtreecommitdiff
path: root/Source/Applications/SampleApps
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Applications/SampleApps')
-rw-r--r--Source/Applications/SampleApps/Makefile12
-rw-r--r--Source/Applications/SampleApps/cxxdemo.cpp5
2 files changed, 8 insertions, 9 deletions
diff --git a/Source/Applications/SampleApps/Makefile b/Source/Applications/SampleApps/Makefile
index a632f87..05f79b1 100644
--- a/Source/Applications/SampleApps/Makefile
+++ b/Source/Applications/SampleApps/Makefile
@@ -1,13 +1,13 @@
.PHONY: clean, mrproper
ASM = nasm
-ASMFLAGS = -f elf
+ASMFLAGS = -f bin
CXX = g++
-CXXFLAGS = -nostartfiles -nostdlib -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND
+CXXFLAGS = -nostartfiles -nostdlib -ffreestanding -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND
LD = ld
-LDFLAGS = -T ../../Library/Link.ld
+LDFLAGS = -T ../../Library/Link.ld -L ../../Library
Applications = asmdemo cxxdemo
@@ -20,13 +20,11 @@ rebuild: mrproper all
echo "* Compiling $<..."
$(CXX) $(CXXFLAGS) -c $< -o $@.o
echo "* Linking $@.o..."
- $(LD) $(LDFLAGS) ../../Library/Melon.o $@.o -o $@
+ $(LD) $(LDFLAGS) $@.o -o $@
%: %.asm
echo "* Compiling $<..."
- $(ASM) $(ASMFLAGS) -o $@.o $<
- echo "* Linking $@.o..."
- $(LD) $(LDFLAGS) $@.o -o $@
+ $(ASM) $(ASMFLAGS) -o $@ $<
clean:
echo "* Removing object files..."
diff --git a/Source/Applications/SampleApps/cxxdemo.cpp b/Source/Applications/SampleApps/cxxdemo.cpp
index b9439ce..3d452e7 100644
--- a/Source/Applications/SampleApps/cxxdemo.cpp
+++ b/Source/Applications/SampleApps/cxxdemo.cpp
@@ -1,9 +1,10 @@
#include <Syscall/Syscall.wtf.h>
-#include <WChar.class.h>
+#include <String.class.h>
#include <Binding/VirtualTerminal.class.h>
#include <Binding/Thread.class.h>
+#include <Binding/File.class.h>
-int main() {
+int main(const Vector<String>& args) {
outvt << "Enter some text plz : ";
String s = invt.readLine();
outvt << s;