From 323e12f1f9ab33df15dcfed210e807561d98fa8c Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 18 Oct 2009 15:27:34 +0200 Subject: Re-organized everything --- Source/Applications/SampleApps/Makefile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'Source/Applications/SampleApps/Makefile') 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..." -- cgit v1.2.3