source: git/omalloc/Makefile.am @ a453bf

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