summaryrefslogtreecommitdiff
path: root/Source/Tools/MakeRamFS/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Tools/MakeRamFS/Makefile')
-rw-r--r--Source/Tools/MakeRamFS/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Source/Tools/MakeRamFS/Makefile b/Source/Tools/MakeRamFS/Makefile
new file mode 100644
index 0000000..019ec29
--- /dev/null
+++ b/Source/Tools/MakeRamFS/Makefile
@@ -0,0 +1,38 @@
+.PHONY: clean, mrproper
+
+CC = gcc
+CXX = g++
+LD = gcc
+LDFLAGS = -lstdc++
+CFLAGS =
+CXXFLAGS =
+
+OutFile = MakeRamFS
+Objects = main.o
+
+all: $(OutFile)
+ echo "* Done with $(OutFile)."
+
+rebuild: mrproper all
+
+$(OutFile): $(Objects)
+ echo "* Linking executable : $(OutFile)..."
+ $(LD) -o $(OutFile) $(LDFLAGS) $^
+
+%.o: %.c
+ echo "* Compiling $<..."
+ $(CC) -c $< -o $@ $(CFLAGS)
+
+%.o: %.cpp
+ echo "* Compiling $<..."
+ $(CXX) -c $< -o $@ $(CXXFLAGS)
+
+clean:
+ echo "* Removing object files..."
+ rm -rf *.o
+ rm -rf */*.o
+ rm -rf */*/*.o
+
+mrproper: clean
+ echo "* Removing executable : $(OutFile)"
+ rm -rf $(OutFile)