-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 927 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Target = driverlist
INCLUDES = include
CXX = g++
CXXFLAGS = -W -std=c++11 -g -ggdb -I $(INCLUDES)
DOCS = docs
SRCDIR = src
OBJDIR = obj
HEADERS := $(wildcard $(INCLUDES) *.h)
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
all: project # docs
all: project #docs
project: $(OBJECTS)
@echo "Linkin Files: " $(OBJECTS) $(DRIVER)
@$(CXX) $(OBJECTS) $(DRIVER) $(CXXFLAGS) -o $(Target)
@echo "Linkin complete!"
docs:
@echo "Generating Documentation"
@doxygen config
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp $(HEADERS) | $(OBJDIR)
@$(CXX) $(CXXFLAGS) -c $< -o $@
@echo "Sources $<"
@echo "Compiling Files $< to $@ "
@echo "Compiled "$<" Succesfully!"
$(OBJDIR):
mkdir -p $(OBJDIR)
.PHONY: clean clean_docs clean_proj
clean: clean_proj #clean_docs
clean_proj:
@rm -r $(OBJDIR)
@rm $(Target)
@echo "Cleanup Complete!"
clean_docs: $(DOCS)
@rm -r $(DOCS)