1
- CPPFLAGS =-g - Wall -fPIC
2
- CFLAGS =-g - Wall -fPIC
1
+ CXXFLAGS =- Wall -fPIC -O2
2
+ CFLAGS =-Wall -fPIC -O2
3
3
4
4
# Enable to test with GCC 3.4
5
5
# CXX=g++34
@@ -8,19 +8,19 @@ PREFIX=/usr
8
8
9
9
SOURCES =mmap_file_pool.cpp mmap_file_pool.h mmap_allocator.h mmap_access_mode.h mmappable_vector.h mmap_exception.h
10
10
11
- HEADERS =mmap_access_mode.h mmap_allocator.h mmap_file_pool.h mmap_exception.h
11
+ HEADERS =mmap_access_mode.h mmap_allocator.h mmap_file_pool.h mmap_exception.h mmappable_vector.h
12
12
LIBRARIES =libmmap_allocator.so libmmap_allocator.a
13
13
14
14
SRC_INSTALL_TARGET_DIR =/home/johannes/re3
15
15
16
- all : test_allocator mmap_file_pool.o $(LIBRARIES )
16
+ all : $(LIBRARIES )
17
17
18
- debug : CPPFLAGS +=-DMMAP_ALLOCATOR_DEBUG=1
19
- debug : CFLAGS+=-DMMAP_ALLOCATOR_DEBUG=1
18
+ debug : CXXFLAGS +=-DMMAP_ALLOCATOR_DEBUG=1 -g
19
+ debug : CFLAGS+=-DMMAP_ALLOCATOR_DEBUG=1 -g
20
20
debug : clean all
21
21
22
22
libmmap_allocator.so : mmap_file_pool.o
23
- g++ -shared -o libmmap_allocator.so mmap_file_pool.o
23
+ $( CXX ) -shared -o libmmap_allocator.so mmap_file_pool.o
24
24
25
25
libmmap_allocator.a : mmap_file_pool.o
26
26
ar r libmmap_allocator.a mmap_file_pool.o
@@ -29,22 +29,22 @@ install_sources: $(SOURCES)
29
29
cp $(SOURCES ) $(SRC_INSTALL_TARGET_DIR )
30
30
31
31
install : all
32
- install -m 644 $( HEADERS ) $(PREFIX ) /include
33
- install -m 755 $( LIBRARIES ) $(PREFIX ) /lib
34
-
35
- test : all
32
+ install -Dm 644 -t $( DESTDIR ) $(PREFIX ) /include $( HEADERS )
33
+ install -Dm 755 -t $( DESTDIR ) $(PREFIX ) /lib $( LIBRARIES )
34
+
35
+ test : test_allocator
36
36
@echo " Running mmap allocator regression test suite."
37
37
bash -c ' export LD_LIBRARY_PATH=. ; ./test_allocator'
38
38
39
- debugtest : debug
39
+ debugtest : debug test_allocator
40
40
@echo " Running mmap allocator regression test suite with verbose enabled."
41
41
bash -c ' export LD_LIBRARY_PATH=. ; ./test_allocator'
42
42
43
43
test_allocator : mmap_allocator.h mmap_file_pool.o test_allocator.o $(LIBRARIES )
44
- g++ test_allocator.o -L. -lmmap_allocator -o test_allocator
44
+ $( CXX ) test_allocator.o -L. -lmmap_allocator -o test_allocator
45
45
46
46
test_mmap_fixed : test_mmap_fixed.c
47
- gcc $(CFLAGS ) test_mmap_fixed.c -o test_mmap_fixed
47
+ $( CC ) $(CFLAGS ) test_mmap_fixed.c -o test_mmap_fixed
48
48
49
49
clean :
50
50
rm -f test_allocator test_mmap_fixed testfile testfile2 * .o $(LIBRARIES )
0 commit comments