-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·38 lines (29 loc) · 940 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
# //----------------------------------------------------------------------------
#/// Filename: Makefile
#/// Description: Makefile for exA
#/// Author: Ankele Robin (0931951)
#/// Tutor: Manuel Weber
#/// Group: 24
#/// Created: 08.09.2011
#/// Last change: 08.09.2011
#//-----------------------------------------------------------------------------
CXX = g++
CXXFLAGS = -c -Wall -g
LDFLAGS =
SOURCES = $(wildcard *.cpp)
OBJECTS = ${SOURCES:.cpp=.o}
TITLE = exA
ARCHIVE = $(TITLE).tar.gz
.PHONY : all clean valgrind archive
all: $(TITLE)
$(TITLE) : $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $(OBJECTS)
%.o : %.cpp
$(CXX) $(CXXFLAGS) -o $@ $< -MMD -MF ./[email protected]
clean :
rm -f *.o *.gch $(TITLE) *.d
valgrind : $(TITLE)
valgrind --tool=memcheck --leak-check=yes ./$< $(P0) $(P1)
archive :
tar cfz $(ARCHIVE) *.cpp *.h *.pdf $(TITLE)
-include $(wildcard ./*.d)