-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (22 loc) · 866 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FILES = src/main.cpp src/graph.cpp src/interface.cpp src/utils.cpp src/logger.cpp src/settings.cpp src/selectionWindow.cpp src/footer.cpp src/settingsWindow.cpp
OBJECTS = main.o graph.o interface.o utils.o logger.o settings.o selectionWindow.o footer.o settingsWindow.o
EXECUTABLE = bandwidth-monitor
# -g compiles debug mode TODO remove
build: $(OBJECTS) $(EXECUTABLE)
help:
@echo 'Available commands:'
@echo
@echo 'Usage:'
@echo ' make build Compile the project.'
@echo ' make test Run project tests.'
@echo ' make clean Clean the project.'
@echo
clean:
rm $(OBJECTS)
rm $(EXECUTABLE)
$(OBJECTS): %.o: src/%.cpp
g++ -c $(CFLAGS) $(CPPFLAGS) $< -o $@ -lncurses -ljsoncpp -Wno-write-strings -Wno-format -g
$(EXECUTABLE): $(OBJECTS)
g++ $(OBJECTS) -o $(EXECUTABLE) -lncurses -ljsoncpp -g
test: $(EXECUTABLE)
./$(EXECUTABLE)