7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
1 |
# Copyright (C) 2009-2010 Ferdinand Majerech
|
2 |
# This file is part of MiniINI
|
|
3 |
# For conditions of distribution and use, see copyright notice in LICENSE.txt
|
|
4 |
||
1
by Ferdinand Majerech
Initial import |
5 |
i_dir = miniini/include/ |
6 |
s_dir = miniini/src/ |
|
7 |
o_dir = obj |
|
7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
8 |
objects = log.o globals.o inisection.o inifile.o allocator.o |
1
by Ferdinand Majerech
Initial import |
9 |
|
7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
10 |
sources = $(s_dir)log.cpp $(s_dir)globals.cpp $(s_dir)inisection.cpp $(s_dir)inifile.cpp $(s_dir)allocator.cpp |
71
by Ferdinand Majerech
Added a custom assert macro that will print a MiniINI error with a custom message. Replaced use of standard assert by this, added some asserts, removed unnecessary asserts. Fixed a bug where empty file warning wouldn't be emitted. |
11 |
headers = $(i_dir)log.h $(i_dir)globals.h $(i_dir)typedefs.h $(i_dir)linetoken.h $(i_dir)inisection.h $(i_dir) inisectionutil.h $(i_dir)inifile.h $(i_dir)inifileutil.h $(i_dir)allocator.h $(i_dir)util.h $(i_dir)parse.h $(i_dir)time.h $(i_dir)miniini_assert.h |
1
by Ferdinand Majerech
Initial import |
12 |
bin_dir = bin/ |
13 |
lib = libminiini.a |
|
14 |
libdbg = libminiini-dbg.a |
|
55
by Ferdinand Majerech
Fixed conflicts with windows.h, made minor changes and fixes. Finished changes for the 0.7.2 release. |
15 |
flags_dbg = -g -Wall -Wextra -Weffc++ -Wold-style-cast -Wundef -Wcast-qual -Wcast-align -Wconversion -Wlogical-op -Wvla $(OPT) -D MINIINI_DEBUG |
52
by Ferdinand Majerech
Specified goals for the next release |
16 |
flags_opt = -Os -funroll-loops $(OPT) -D NDEBUG |
1
by Ferdinand Majerech
Initial import |
17 |
|
18 |
define compile
|
|
19 |
rm -f $(bin_dir)$(lib) |
|
20 |
g++ $(CPPFLAGS) $(LDFLAGS) -c $(sources) |
|
21 |
mkdir -p $(bin_dir) |
|
22 |
ar -cvq $(bin_dir)$(lib) $(objects) |
|
23 |
ar -t $(bin_dir)$(lib) |
|
24 |
rm $(objects) |
|
25 |
endef
|
|
26 |
||
70
by Ferdinand Majerech
Refactored Allocator code and updated its documentation. |
27 |
.PHONY: all no-stl benchmark-debug benchmark-debug-no-stl benchmark-optimized benchmark-optimized-no-stl debug debug-no-stl optimized optimized-no-stl tester tester-no-stl clean install uninstall |
1
by Ferdinand Majerech
Initial import |
28 |
|
29 |
all: |
|
30 |
make debug |
|
31 |
make optimized |
|
32 |
make tester |
|
7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
33 |
make benchmark-debug |
34 |
make benchmark-optimized |
|
1
by Ferdinand Majerech
Initial import |
35 |
|
12
by Ferdinand Majerech
Added 0.4.0 changes |
36 |
no-stl: |
37 |
make debug-no-stl |
|
38 |
make optimized-no-stl |
|
39 |
make tester-no-stl |
|
69
by Ferdinand Majerech
Rewrote all testing functionality with a more maintainable system. Fixed a minor bug in documentation and a bug introduced in a recent revision that made no-stl builds impossible. |
40 |
make benchmark-debug-no-stl |
41 |
make benchmark-optimized-no-stl |
|
12
by Ferdinand Majerech
Added 0.4.0 changes |
42 |
|
43 |
debug: CPPFLAGS = -I $(i_dir) $(flags_dbg) |
|
1
by Ferdinand Majerech
Initial import |
44 |
debug: lib = $(libdbg) |
45 |
debug: |
|
46 |
$(compile) |
|
47 |
||
55
by Ferdinand Majerech
Fixed conflicts with windows.h, made minor changes and fixes. Finished changes for the 0.7.2 release. |
48 |
debug-no-stl: CPPFLAGS = -I $(i_dir) $(flags_dbg) -D MINIINI_NO_STL |
12
by Ferdinand Majerech
Added 0.4.0 changes |
49 |
debug-no-stl: lib = $(libdbg) |
50 |
debug-no-stl: |
|
51 |
$(compile) |
|
52 |
||
53 |
optimized: CPPFLAGS = -I $(i_dir) $(flags_opt) |
|
1
by Ferdinand Majerech
Initial import |
54 |
optimized: |
55 |
$(compile) |
|
56 |
||
55
by Ferdinand Majerech
Fixed conflicts with windows.h, made minor changes and fixes. Finished changes for the 0.7.2 release. |
57 |
optimized-no-stl: CPPFLAGS = -I $(i_dir) $(flags_opt) -D MINIINI_NO_STL |
12
by Ferdinand Majerech
Added 0.4.0 changes |
58 |
optimized-no-stl: |
59 |
$(compile) |
|
60 |
||
7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
61 |
tester: CPPFLAGS = -I $(i_dir) $(flags_dbg) |
1
by Ferdinand Majerech
Initial import |
62 |
tester: |
63 |
g++ -o $(bin_dir)tester $(CPPFLAGS) $(LDFLAGS) $(s_dir)tester.cpp $(bin_dir)$(libdbg) |
|
64 |
||
55
by Ferdinand Majerech
Fixed conflicts with windows.h, made minor changes and fixes. Finished changes for the 0.7.2 release. |
65 |
tester-no-stl: CPPFLAGS = -I $(i_dir) $(flags_dbg) -D MINIINI_NO_STL |
12
by Ferdinand Majerech
Added 0.4.0 changes |
66 |
tester-no-stl: |
67 |
g++ -o $(bin_dir)tester $(CPPFLAGS) $(LDFLAGS) $(s_dir)tester.cpp $(bin_dir)$(libdbg) |
|
68 |
||
7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
69 |
benchmark-debug: CPPFLAGS = -I $(i_dir) $(flags_dbg) |
70 |
benchmark-debug: |
|
71 |
g++ -o $(bin_dir)benchmark-dbg $(CPPFLAGS) $(LDFLAGS) $(s_dir)benchmark.cpp $(bin_dir)$(libdbg) |
|
12
by Ferdinand Majerech
Added 0.4.0 changes |
72 |
|
69
by Ferdinand Majerech
Rewrote all testing functionality with a more maintainable system. Fixed a minor bug in documentation and a bug introduced in a recent revision that made no-stl builds impossible. |
73 |
benchmark-debug-no-stl: CPPFLAGS = -I $(i_dir) $(flags_dbg) -D MINIINI_NO_STL |
74 |
benchmark-debug-no-stl: |
|
75 |
g++ -o $(bin_dir)benchmark-dbg $(CPPFLAGS) $(LDFLAGS) $(s_dir)benchmark.cpp $(bin_dir)$(libdbg) |
|
76 |
||
73
by Ferdinand Majerech
Added allocation and INI data loading measurements to extra benchmark data, fixed a bug in makefile introduced in a recent revision, added a special tagshuge benchmark ini file. |
77 |
benchmark-optimized: CPPFLAGS = -I $(i_dir) $(flags_opt) |
78 |
benchmark-optimized: |
|
79 |
g++ -o $(bin_dir)benchmark $(CPPFLAGS) $(LDFLAGS) $(s_dir)benchmark.cpp $(bin_dir)$(lib) |
|
80 |
||
69
by Ferdinand Majerech
Rewrote all testing functionality with a more maintainable system. Fixed a minor bug in documentation and a bug introduced in a recent revision that made no-stl builds impossible. |
81 |
benchmark-optimized-no-stl: CPPFLAGS = -I $(i_dir) $(flags_opt) -D MINIINI_NO_STL |
82 |
benchmark-optimized-no-stl: |
|
7
by Ferdinand Majerech
Added custom memory allocator, assert to check for simple coding mistakes, benchmarking inifile/inisection code and scripts, updated documentation for 0.3 release, and fixed some bugs. |
83 |
g++ -o $(bin_dir)benchmark $(CPPFLAGS) $(LDFLAGS) $(s_dir)benchmark.cpp $(bin_dir)$(lib) |
84 |
||
1
by Ferdinand Majerech
Initial import |
85 |
clean: |
86 |
rm -f $(objects) |
|
87 |
rm -r -f bin |
|
88 |
||
89 |
install: |
|
16
by Ferdinand Majerech
Makefile now uses to specify where to install |
90 |
mkdir -p $(DESTDIR)/usr/lib/ |
91 |
mkdir -p $(DESTDIR)/usr/include/ |
|
92 |
cp $(bin_dir)$(lib) $(DESTDIR)/usr/lib/$(lib) |
|
93 |
cp $(bin_dir)$(libdbg) $(DESTDIR)/usr/lib/$(libdbg) |
|
94 |
cp miniini.h $(DESTDIR)/usr/include |
|
95 |
cp -R miniini $(DESTDIR)/usr/include |
|
1
by Ferdinand Majerech
Initial import |
96 |
|
97 |
uninstall: |
|
98 |
rm -f /usr/lib/$(lib) |
|
99 |
rm -f /usr/lib/$(libdbg) |
|
100 |
rm -f /usr/include/miniini.h |
|
101 |
rm -r -f /usr/include/miniini |