summaryrefslogtreecommitdiff
path: root/note_compiler/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'note_compiler/Makefile')
-rw-r--r--note_compiler/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/note_compiler/Makefile b/note_compiler/Makefile
new file mode 100644
index 0000000..bc51697
--- /dev/null
+++ b/note_compiler/Makefile
@@ -0,0 +1,33 @@
+CXX=g++
+CXXFLAGS=-Wall -g
+LDFLAGS=-lm
+
+OBJ=main.o
+BIN=compiler
+
+DEPENDFILE = .depend
+
+
+SRC = $(OBJ:%.o=%.cpp)
+
+all: $(BIN)
+
+
+$(BIN): $(OBJ)
+ $(CXX) $(CFLAGS) -o $(BIN) $(OBJ) $(LDFLAGS)
+
+
+depend dep: $(SRC)
+ $(CC) -MM $(SRC) > $(DEPENDFILE)
+
+-include $(DEPENDFILE)
+
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $<
+
+.PHONY: clean dep depend
+
+clean:
+ rm -f $(OBJ) $(BIN)
+