1 | ACLOCAL_AMFLAGS = -I ../m4 |
---|
2 | |
---|
3 | |
---|
4 | lib_LTLIBRARIES=libomalloc.la |
---|
5 | # libomalloc_g.la |
---|
6 | |
---|
7 | #if WANT_DEBUG |
---|
8 | ## lib_LTLIBRARIES+= |
---|
9 | #endif |
---|
10 | |
---|
11 | libomalloc_includedir=$(includedir)/omalloc |
---|
12 | |
---|
13 | libomalloc_include_HEADERS = \ |
---|
14 | omalloc.h omDerivedConfig.h \ |
---|
15 | omError.h omStructs.h omAllocDecl.h \ |
---|
16 | omInlineDecl.h omBin.h omMemOps.h \ |
---|
17 | omList.h omGetBackTrace.h \ |
---|
18 | omRet2Info.h omStats.h omOpts.h \ |
---|
19 | omBinPage.h omAllocSystem.h \ |
---|
20 | omAllocPrivate.h omDebug.h omInline.h \ |
---|
21 | omAllocFunc.h mylimits.h |
---|
22 | |
---|
23 | noinst_HEADERS= omPage.h omDefaultConfig.h omReturn.h omGetPageSize.h \ |
---|
24 | omMalloc.h omMallocSystem.h |
---|
25 | |
---|
26 | SOURCES=\ |
---|
27 | omBinPage.c omList.c omAllocEmulate.c omDebug.c \ |
---|
28 | om_Alloc.c omDebugCheck.c omOpts.c omGetBackTrace.c \ |
---|
29 | omAllocSystem.c omError.c omStats.c omRet2Info.c \ |
---|
30 | omBin.c omDebugTrack.c \ |
---|
31 | omalloc_provide.c omAllocFunc.c |
---|
32 | |
---|
33 | EXTRA_DIST = omalloc.c omtTestAlloc.c omtTest.h omMmap.c |
---|
34 | |
---|
35 | AM_CPPFLAGS =-I${top_srcdir}/.. -I${top_builddir}/.. -DHAVE_CONFIG_H |
---|
36 | |
---|
37 | libomalloc_la_SOURCES=$(SOURCES) $(noinst_HEADERS) |
---|
38 | # libomalloc_g_la_SOURCES=$(SOURCES) $(noinst_HEADERS) |
---|
39 | |
---|
40 | |
---|
41 | libomalloc_la_LDFLAGS = -release ${PACKAGE_VERSION} |
---|
42 | libomalloc_la_CFLAGS = -O2 |
---|
43 | |
---|
44 | nodist_libomalloc_la_SOURCES = omTables.inc omTables.h mylimits.h |
---|
45 | # nodist_libomalloc_g_la_SOURCES = omTables.inc omTables.h mylimits.h |
---|
46 | |
---|
47 | nodist_libomalloc_include_HEADERS = omConfig.h mylimits.h omTables.h |
---|
48 | |
---|
49 | ### NOTE: "_g" (debug) means full library |
---|
50 | ### libomalloc_la_CPPFLAGS= -DOM_ALLOC_INTERNAL -DHAVE_CONFIG_H -DOM_NDEBUG |
---|
51 | |
---|
52 | libomalloc_la_CPPFLAGS = ${AM_CPPFLAGS} -DOM_ALLOC_INTERNAL |
---|
53 | # libomalloc_g_la_CPPFLAGS= ${AM_CPPFLAGS} -DOM_ALLOC_INTERNAL -DHAVE_CONFIG_H |
---|
54 | |
---|
55 | BUILT_SOURCES = omTables.inc omTables.h |
---|
56 | |
---|
57 | omTables.inc: omTables$(EXEEXT) omalloc.h |
---|
58 | ./omTables$(EXEEXT) > omTables.xx && mv omTables.xx $@ |
---|
59 | |
---|
60 | omTables.h: omTables$(EXEEXT) |
---|
61 | ./omTables$(EXEEXT) 1 >omTables.yy && mv omTables.yy $@ |
---|
62 | |
---|
63 | noinst_PROGRAMS = omTables |
---|
64 | omTables_SOURCES = omAllocPrivate.h omTables.c mylimits.h |
---|
65 | nodist_omTables_SOURCES = omConfig.h |
---|
66 | omTables_CPPFLAGS = ${AM_CPPFLAGS} -DOM_GENERATE_INC |
---|
67 | |
---|
68 | CLEANFILES = $(BUILT_SOURCES) |
---|
69 | |
---|
70 | #################################################### |
---|
71 | ## Test program |
---|
72 | ## |
---|
73 | # AM_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc |
---|
74 | |
---|
75 | TESTS = omtTest-s-m omtTest-d-m |
---|
76 | # omtTest-d-g omtTest-s-g |
---|
77 | |
---|
78 | #if WANT_DEBUG |
---|
79 | ## TESTS+= |
---|
80 | #endif |
---|
81 | |
---|
82 | check_PROGRAMS = $(TESTS) |
---|
83 | |
---|
84 | |
---|
85 | EXTRA_PROGRAMS = omtTest-s-r omtTest-d-r |
---|
86 | #### tests fail: omtTest-s-r omtTest-d-r due to |
---|
87 | # !!!expect omError_UnalignedAddr |
---|
88 | # ***omError_UnalignedAddr: addr is unaligned |
---|
89 | # occured at: ../../omalloc/omtTestError.c:260 |
---|
90 | # occured for (invalid) addr: 0x7fc5c3602811 (error=14) |
---|
91 | # +++ok omError_UnalignedAddr |
---|
92 | # |
---|
93 | # !!!expect omError_NullSizeAlloc |
---|
94 | # 2669 Segmentation fault |
---|
95 | |
---|
96 | OMTTESTSSOURCES = omtTestReal.c omtTestDebug.c omtTestKeep.c omtTestError.c omtTest.c |
---|
97 | |
---|
98 | # omtTest_s_g_SOURCES = $(OMTTESTSSOURCES) |
---|
99 | # # omtTest_s_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H |
---|
100 | # # omtTest_s_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} |
---|
101 | # omtTest_s_g_LDADD = libomalloc.la |
---|
102 | # omtTest_s_g_LDFLAGS = -L${builddir} -static |
---|
103 | |
---|
104 | omtTest_s_m_CPPFLAGS = ${AM_CPPFLAGS} -DOM_TEST_MALLOC |
---|
105 | omtTest_s_m_SOURCES = $(OMTTESTSSOURCES) |
---|
106 | omtTest_s_m_LDADD = libomalloc.la |
---|
107 | omtTest_s_m_LDFLAGS = -L${builddir} -static |
---|
108 | |
---|
109 | omtTest_s_r_SOURCES = $(OMTTESTSSOURCES) |
---|
110 | omtTest_s_r_CPPFLAGS = ${AM_CPPFLAGS} |
---|
111 | # omtTest_s_r_CFLAGS = -O3 ${PIPE} |
---|
112 | omtTest_s_r_LDADD = libomalloc.la |
---|
113 | omtTest_s_r_LDFLAGS = -L${builddir} -static |
---|
114 | |
---|
115 | |
---|
116 | |
---|
117 | # omtTest_d_g_SOURCES = $(OMTTESTSSOURCES) |
---|
118 | # # omtTest_d_g_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H |
---|
119 | # # omtTest_d_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} |
---|
120 | # omtTest_d_g_LDADD = libomalloc.la |
---|
121 | # omtTest_d_g_LDFLAGS = -L${builddir} |
---|
122 | |
---|
123 | omtTest_d_m_CPPFLAGS = ${AM_CPPFLAGS} -DOM_TEST_MALLOC |
---|
124 | omtTest_d_m_SOURCES = $(OMTTESTSSOURCES) |
---|
125 | omtTest_d_m_LDADD = libomalloc.la |
---|
126 | omtTest_d_m_LDFLAGS = -L${builddir} |
---|
127 | |
---|
128 | omtTest_d_r_SOURCES = $(OMTTESTSSOURCES) |
---|
129 | omtTest_d_r_CPPFLAGS = ${AM_CPPFLAGS} -DOM_NDEBUG |
---|
130 | # omtTest_d_r_CFLAGS = -O3 ${PIPE} |
---|
131 | omtTest_d_r_LDADD = libomalloc.la |
---|
132 | omtTest_d_r_LDFLAGS = -L${builddir} |
---|