summaryrefslogtreecommitdiff
path: root/note_compiler/Makefile
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2010-12-30 18:06:15 +0100
committerFlorian Jung <flo@thinkpad.(none)>2010-12-30 18:17:52 +0100
commitd46f6ee0a6298ff58c6f4f0647d49fb4a76f9ea9 (patch)
treebc38f75448e9da7078d6126a8d98b44a8818367c /note_compiler/Makefile
parent725302c54573d1095d49d466ebda94abe9c13dd5 (diff)
Improved Makefile and .gitignore
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)
+