-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.am
More file actions
102 lines (86 loc) · 3.08 KB
/
Makefile.am
File metadata and controls
102 lines (86 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = . lib
# HACK to disable -O2 if DEBUG is set (to anything) -- thanks for nothing, automake
AM_CXXFLAGS = -O2 $(DEBUG:%=-O0) -std=c++14 -ggdb -fkeep-inline-functions -Wall \
-Wno-deprecated-declarations -fPIC \
-Wp,-w -Iinclude $(LIBSRK31CXX_CFLAGS) $(LIBCXXFILENO_CFLAGS) \
$(LIBDWARFPP_CFLAGS) $(LIBCXXGEN_CFLAGS) $(LIBANTLR3CXX_CFLAGS) \
$(DWARFIDL_CFLAGS) -I$(LIBRUNT)/include
AM_CPPFLAGS =
AM_CFLAGS = -Wall -std=gnu99 -ggdb -O3 -flto -Iinclude -fPIC -Wp,-w
AM_LDFLAGS =
# ltdl complains if I don't set these....
noinst_LTLIBRARIES =
include_HEADERS =
lib_LTLIBRARIES =
EXTRA_DIST =
EXTRA_LTLIBRARIES =
CLEANFILES =
MOSTLYCLEANFILES =
extra_DIST = liballocstool.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = liballocstool.pc
liballocstool_includedir = $(includedir)/liballocstool
liballocstool_include_HEADERS = include/uniqtype-defs.h include/uniqtype.h include/allocmeta-defs.h
lib_LIBRARIES = src/liballocstool.a
src_liballocstool_a_SOURCES = src/stickyroot.cpp src/uniqtypes.cpp src/allocsites-info.cpp \
src/frame-element.cpp src/subprograms-util.cpp
LIBELF ?= -lelf
export LIBELF
# pkg-config doesn't understand PKG_CXXFLAGS, but I'm buggered
# if I'm going to have my Makefiles use _CFLAGS to mean _CXXFLAGS.
# So, if we find we have _CFLAGS set for these, either from pkg.m4
# or because pkg.m4 told the user to set this var, and if we *don't*
# have _CXXFLAGS for these things, propagate. Only one of the USER_*_CFLAGS
# and *_CFLAGS should be non-empty. Note that if we got this far,
# we *must* have a _CFLAGS, even if the user (sanely) didn't call it that,
# because pkg-config will have complained if we didn't fake it up.
if SUPPLIED_LIBCXXFILENO_CFLAGS
LIBCXXFILENO_CXXFLAGS = $(USER_LIBCXXFILENO_CFLAGS)
else
LIBCXXFILENO_CXXFLAGS = $(LIBCXXFILENO_CFLAGS)
endif
if SUPPLIED_LIBDWARFPP_CFLAGS
LIBDWARFPP_CXXFLAGS = $(USER_LIBDWARFPP_CFLAGS)
else
LIBDWARFPP_CXXFLAGS = $(LIBDWARFPP_CFLAGS)
endif
if SUPPLIED_LIBCXXGEN_CFLAGS
LIBCXXGEN_CXXFLAGS = $(USER_LIBCXXGEN_CFLAGS)
else
LIBCXXGEN_CXXFLAGS = $(LIBCXXGEN_CFLAGS)
endif
if SUPPLIED_LIBSRK31CXX_CFLAGS
LIBSRK31CXX_CXXFLAGS = $(USER_LIBSRK31CXX_CFLAGS)
else
LIBSRK31CXX_CXXFLAGS = $(LIBSRK31CXX_CFLAGS)
endif
if SUPPLIED_LIBANTLR3CXX_CFLAGS
LIBANTLR3CXX_CXXFLAGS = $(USER_LIBANTLR3CXX_CFLAGS)
else
LIBANTLR3CXX_CXXFLAGS = $(LIBANTLR3CXX_CFLAGS)
endif
if SUPPLIED_DWARFIDL_CFLAGS
DWARFIDL_CXXFLAGS = $(USER_DWARFIDL_CFLAGS)
else
DWARFIDL_CXXFLAGS = $(DWARFIDL_CFLAGS)
endif
LIBRUNT = $(librunt)
export LIBCXXFILENO_CXXFLAGS LIBCXXFILENO_LIBS \
LIBSRK31CXX_CXXFLAGS LIBSRK31CXX_LIBS \
LIBDWARFPP_CXXFLAGS LIBDWARFPP_LIBS \
LIBCXXGEN_CXXFLAGS LIBCXXGEN_LIBS \
LIBANTLR3CXX_CXXFLAGS LIBANTLR3CXX_LIBS \
DWARFIDL_CXXFLAGS DWARFIDL_LIBS \
CC CXX CPP CXXFLAGS LDFLAGS LDLIBS
if DEBUG
export DEBUG = 1
endif
lib/liballocstool.a: $(lib_LTLIBRARIES)
mkdir -p lib && cd lib && ln -sf ../src/liballocstool.a .
# HACK to prevent ranlib from making a huge temporary file
src/liballocstool.a: $(patsubst %.cpp,%.o,$(src_liballocstool_a_SOURCES))
rm -f $@; $(AR) scru $@ $+
all: lib/liballocstool.a
clean:
$(MAKE) clean-recursive