diff options
Diffstat (limited to 'note_compiler/Makefile')
-rw-r--r-- | note_compiler/Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/note_compiler/Makefile b/note_compiler/Makefile new file mode 100644 index 0000000..6a08b81 --- /dev/null +++ b/note_compiler/Makefile @@ -0,0 +1,34 @@ +CXX=g++ +CFLAGS=-Wall -g +CXXFLAGS=$(CFLAGS) +LDFLAGS=-lm `pkg-config --cflags --libs jack` + +OBJ=main.o parser.o util.o +BIN=compiler + +DEPENDFILE = .depend + + +SRC = $(OBJ:%.o=%.cpp) + +all: $(BIN) + + +$(BIN): $(OBJ) + $(CXX) $(CXXFLAGS) -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) + |