From d46f6ee0a6298ff58c6f4f0647d49fb4a76f9ea9 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 30 Dec 2010 18:06:15 +0100 Subject: Improved Makefile and .gitignore --- note_compiler/.gitignore | 1 + note_compiler/Makefile | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 note_compiler/.gitignore create mode 100644 note_compiler/Makefile (limited to 'note_compiler') 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) + -- cgit v1.2.3