summaryrefslogblamecommitdiff
path: root/Source/Applications/Shell/Makefile
blob: 4efe01eed21946e58eb7e3030eae7174001ba7ce (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                       
                                                                                                                                                                                  

       
                                                  
 

                                  

               


                          




                                      
                              
                                 
 



                                             





                                         
                              


                                         
                                    
.PHONY: clean, mrproper

CXX = g++
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/App.ld -L ../../Library

Objects = Shell.class.o \
		  Shell-fs.class.o
OutFile = Shell

Applets = Applets/rot13

all: $(OutFile) $(Applets)
	echo "* Done with $(OutFile)."

rebuild: mrproper all

$(OutFile): $(Objects)
	echo "* Linking $@..."
	$(LD) $(LDFLAGS) $^ -o $@

Applets/%: Applets/%.o
	echo "* Linking $@..."
	$(LD) $(LDFLAGS) $^ -o $@ -Map $@.map

%.o: %.cpp
	echo "* Compiling $<..."
	$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
	echo "* Removing object files..."
	rm -rf *.o Applets/*.o

mrproper: clean
	echo "* Removing applications..."
	rm -rf $(OutFile) $(Applets)