summaryrefslogtreecommitdiff
path: root/note_compiler
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
parent725302c54573d1095d49d466ebda94abe9c13dd5 (diff)
Improved Makefile and .gitignore
Diffstat (limited to 'note_compiler')
-rw-r--r--note_compiler/.gitignore1
-rw-r--r--note_compiler/Makefile33
2 files changed, 34 insertions, 0 deletions
diff --git a/note_compiler/.gitignore b/note_compiler/.gitignore
new file mode 100644
index 0000000..86a7c8e
--- /dev/null
+++ b/note_compiler/.gitignore
@@ -0,0 +1 @@
+compiler
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)
+