-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (59 loc) · 2.1 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#################################
#
#Copyright (c) 2015. Lukas Dresel, Julius Lohmann, Benedikt Lorch, Burkhard Ringlein, Andreas Rupp, Yuriy Sulima, Carola Touchy
#
#This file is part of GarbageCollector.
#
# GarbageCollector is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GarbageCollector is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GarbageCollector. If not, see <http://www.gnu.org/licenses/>.
#
#################################
SOURCES = main.c
PROG =GarbageCollector
CC =g++
DYNLIBS =
### misc. options #####
CFLAGS = -Wall -DLINUX -lstdc++ -std=c++11 -Wconversion -Werror # -pedantic # -Wextra
CFLAGS += -fPIC -O3 -funroll-loops # -g
LIBFLAGS = -pthread -lm
RM = rm -f
BUILD_TYPE = debug # oder production
DEBUGFLAGS =
SOURCES = $(shell ls *.cpp 2> /dev/null)
SOURCES += $(shell find modules/*.cpp 2> /dev/null)
OBJS = $(SOURCES:%.cpp=%.o)
#################################
# explicit dependencies
all:
debug: DEBUGFLAGS += -DDEBUG
debug: CFLAGS += -g
spam: DEBUGFLAGS += -DDEBUG -DSPAM
spam: CFLAGS += -g
main.o: jbuffer.o sem.o
test/VerifyJPEGTester: DEBUGFLAGS += -DDEBUG
########################
.PHONY: all clean debug
all: $(PROG)
clean:
$(RM) $(PROG) $(OBJS) test/GarbageManTester test/VerifyJPEGTester test/*.o
debug: $(PROG)
spam: $(PROG)
echo "You wanted extra verbose debug output. Don't blame me!"
$(PROG): $(OBJS) $(DYNLIBS)
$(CC) $(CFLAGS) $(LIBFLAGS) -o $@ $^
%.o: %.cpp
$(CC) -c $(CFLAGS) $(DEBUGFLAGS) $< -o $@
GarbageManTester: GarbageManTester.o GarbageMan.o
$(CC) $(CFLAGS) -g $(LIBFLAGS) -o $@ $^
test/VerifyJPEGTester: test/VerifyJPEGTester.o modules/VerifyJPEG.o
$(CC) $(CFLAGS) -g $(LIBFLAGS) -o $@ $^