Debian Codegraph @

Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 CC ?= gcc
2 CXX ?= g++
3 AR ?= ar
4 CPPFLAGS=-g -Wall -fPIC
5 CFLAGS=-g -Wall -fPIC
6
7 # Enable to test with GCC 3.4
8 # CXX=g++34
9
10 PREFIX=/usr
11
12 SOURCES=mmap_file_pool.cpp mmap_file_pool.h mmap_allocator.h mmap_access_mode.h mmappable_vector.h mmap_exception.h
13
14 HEADERS=mmap_access_mode.h mmap_allocator.h mmap_file_pool.h mmap_exception.h
15 LIBRARIES=libmmap_allocator.so libmmap_allocator.a
16
17 SRC_INSTALL_TARGET_DIR=/home/johannes/re3
18
19 all: test_allocator mmap_file_pool.o $(LIBRARIES)
20
21 debug: CPPFLAGS+=-DMMAP_ALLOCATOR_DEBUG=1
22 debug: CFLAGS+=-DMMAP_ALLOCATOR_DEBUG=1
23 debug: clean all
24
25 libmmap_allocator.so: mmap_file_pool.o
26 $(CXX) -shared -o libmmap_allocator.so mmap_file_pool.o
27
28 libmmap_allocator.a: mmap_file_pool.o
29 $(AR) r libmmap_allocator.a mmap_file_pool.o
30
31 install_sources: $(SOURCES)
32 cp $(SOURCES) $(SRC_INSTALL_TARGET_DIR)
33
34 install: all
35 install -m 644 $(HEADERS) $(PREFIX)/include
36 install -m 755 $(LIBRARIES) $(PREFIX)/lib
37
38 test: all
39 @echo "Running mmap allocator regression test suite."
40 bash -c 'export LD_LIBRARY_PATH=. ; ./test_allocator'
41
42 debugtest: debug
43 @echo "Running mmap allocator regression test suite with verbose enabled."
44 bash -c 'export LD_LIBRARY_PATH=. ; ./test_allocator'
45
46 test_allocator: mmap_allocator.h mmap_file_pool.o test_allocator.o $(LIBRARIES)
47 $(CXX) test_allocator.o -L. -lmmap_allocator -o test_allocator
48
49 test_mmap_fixed: test_mmap_fixed.c
50 $(CC) $(CFLAGS) test_mmap_fixed.c -o test_mmap_fixed
51
52 clean:
53 rm -f test_allocator test_mmap_fixed testfile testfile2 *.o $(LIBRARIES)
54
55 mmap_file_pool.o: mmap_file_pool.cpp mmap_file_pool.h mmap_allocator.h mmap_access_mode.h mmappable_vector.h mmap_exception.h
56
57 test_allocator.o: test_allocator.cpp mmap_file_pool.h mmap_allocator.h mmap_access_mode.h mmappable_vector.h mmap_exception.h