Change call to openBinary
[dyninst.git] / parseThat / Makefile.in
1 # ----------------------------------------------
2 # Configuration variables taken from ./configure
3 # ----------------------------------------------
4 CPPFLAGS     = @CPPFLAGS@
5 CXX          = @CXX@
6 CXXFLAGS     = @CXXFLAGS@
7 DEFINES      = @DEFS@
8 LDFLAGS      = @LDFLAGS@
9 LIBS         = @LIBS@
10
11 prefix       = @prefix@
12 PLATFORM    ?= @build@
13 DYNINST_VER  = @DYNINST_VER@
14
15 INSTALL      = @INSTALL@
16
17 vpath % @srcdir@/src
18
19 # -------------------------------------------
20 # Begin Makefile based on variables set above
21 # -------------------------------------------
22 .PHONY: clean ready
23
24 SRCS         = parseThat.C \
25                config.C \
26                ipc.C \
27                record.C \
28                strlist.C \
29                reglist.C \
30                log.C \
31                utils.C \
32                sha1.C \
33                dyninstCore.C
34
35 ifeq ($(DYNINST_VER), 5)
36 SRCS        += dyninstCompat.v5.C
37 endif
38
39 ifeq ($(DYNINST_VER), 4)
40 SRCS        += dyninstCompat.v4.C
41 endif
42
43 OBJDIR       = obj-$(PLATFORM)
44 OBJS         = $(addprefix $(OBJDIR)/, $(SRCS:%.C=%.o))
45
46 CXXFLAGS    += -Wall
47 LIBS        += -ldyninstAPI -liberty
48
49 ifneq (, $(findstring sparc, $(PLATFORM)))
50 LIBS        += -lelf -lstdc++ -lsocket -lrt
51 endif
52
53 ifneq (, $(findstring alpha, $(PLATFORM)))
54 CXXFLAGS    += -pthread
55 endif
56
57 ifneq (, $(findstring ia64, $(PLATFORM)))
58 LIBS        += -ldl
59 endif
60
61 all: ready $(OBJDIR)/parseThat
62
63 install: $(OBJDIR)/parseThat
64         $(INSTALL) -d $(prefix)
65         $(INSTALL) $(OBJDIR)/parseThat $(prefix)/parseThat
66
67 clean:
68         rm -rf $(OBJDIR)
69
70 distclean: clean
71         rm -rf config.log config.status $(OBJDIR) Makefile
72
73 ready:
74         $(INSTALL) -d $(OBJDIR)
75
76 $(OBJDIR)/parseThat: $(OBJS)
77         $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) $(LIBS)
78
79 $(OBJS): $(OBJDIR)/%.o: %.C
80         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(DEFINES) $^ -c -o $@
81
82 alarm: alarm.c liblib.so
83         gcc -Wall -g -o alarm alarm.c liblib.so
84
85 liblib.so: lib.c
86         gcc -Wall -g -shared -o liblib.so lib.c