[doc] Update INSTALL file once more.
[libvscmgmt.git] / config.mk
1 #
2 # General config for all Makefile for Virtualized Supercomputer Management
3 #
4 # Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
5 # Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org>
6 #
7
8 CC                 = gcc
9 PREFIX             = /usr/local
10 CLEAN_PATTERNS     = *.o *.a *.so *.gcda *.gcno
11
12 # Backend configuration
13 DATA_BACKEND       = glibtree
14 MUTEX_BACKEND      = pthread
15 NETWORK_BACKEND    = dhcponly
16
17 BACKEND_LDFLAGS_L1 = -L ../backend/data/$(DATA_BACKEND) \
18                      -lvscmgmt-data-$(DATA_BACKEND) \
19                      -L ../backend/mutex/$(MUTEX_BACKEND) \
20                      -lvscmgmt-mutex-$(MUTEX_BACKEND) \
21                      -L ../backend/network/$(NETWORK_BACKEND) \
22                      -lvscmgmt-network-$(NETWORK_BACKEND)
23 LIBVSCMGMT_LDFLAGS_L1 = -L ../lib -lvscmgmt \
24                         $(BACKEND_LDFLAGS_L1)
25
26 BACKEND_LDFLAGS_L2 = -L ../../backend/data/$(DATA_BACKEND) \
27                      -lvscmgmt-data-$(DATA_BACKEND) \
28                      -L ../../backend/mutex/$(MUTEX_BACKEND) \
29                      -lvscmgmt-mutex-$(MUTEX_BACKEND) \
30                      -L ../../backend/network/$(NETWORK_BACKEND) \
31                      -lvscmgmt-network-$(NETWORK_BACKEND)
32 LIBVSCMGMT_LDFLAGS_L2 = -L ../../lib -lvscmgmt \
33                         $(BACKEND_LDFLAGS_L2)
34
35 ifeq ($(DATA_BACKEND),glibtree)
36         BACKEND_LDFLAGS_L1 += $(shell pkg-config --libs glib-2.0)
37         BACKEND_LDFLAGS_L2 += $(shell pkg-config --libs glib-2.0)
38 endif
39
40 #
41 # Fancy gcc options
42 #
43
44 CFLAGS  += -fPIC
45
46 # Daumenschrauben
47 CFLAGS  += -std=gnu99 -Wall -Werror -W -Wextra -Wmissing-declarations \
48            -Wmissing-prototypes -Wcast-align -Wpointer-arith -Wreturn-type \
49            -Wformat -Wformat-security -Wnested-externs -Wsign-compare \
50            -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline
51
52 # Debugging
53 CFLAGS  += -O0 -g -ggdb
54
55 # Coverage analysis
56 CFLAGS  += -fprofile-arcs -ftest-coverage
57 LDFLAGS += -lgcov
58
59 #
60 # Include optional user config
61 #
62
63 -include config-user.mk