More parseThat build issues
[dyninst.git] / parseThat / Makefile
1 TO_CORE = ../
2 TO_SCRIPTS = ../../scripts
3 USES_DWARF_DEBUG = true
4 USES_LIBELF = true
5
6 include ../make.config
7 VPATH = $(PLATFORM)
8
9 ABS_PROGRAM_DEST := $(shell cd $(PROGRAM_DEST); pwd)
10 ABS_LIBRARY_DEST := $(shell cd $(LIBRARY_DEST); pwd)
11 ABS_INCLUDE_DEST := $(shell cd $(INCLUDE_DEST); pwd)
12 ABS_LIBDWARF_DEST := $(shell cd $(LIBDWARF_LIB); pwd)
13 ABS_LIBELF_DEST := $(shell cd $(LIBELF_LIB); pwd)
14
15 all:  $(PLATFORM)/parseThat
16
17 $(PLATFORM)/parseThat: $(PLATFORM)/Makefile
18         $(MAKE) -C $(PLATFORM)
19
20 $(PLATFORM)/Makefile: Makefile.in
21         @if [ -d $(PLATFORM) ]; then \
22                 echo "directory $(PLATFORM) exists"; \
23         else \
24                 mkdir $(PLATFORM); \
25         fi; \
26    cd $(PLATFORM); \
27    if [ -d $(ABS_PROGRAM_DEST) ]; then \
28                 ../configure --with-elf-lib=$(ABS_LIBELF_DEST) --with-dwarf-lib=$(ABS_LIBDWARF_DEST) --with-dyninst-lib=$(ABS_LIBRARY_DEST) --with-dyninst-include=$(ABS_INCLUDE_DEST) --prefix=$(ABS_PROGRAM_DEST); \
29    else \
30                 ../configure --with-elf-lib=$(ABS_LIBELF_DEST) --with-dwarf-lib=$(ABS_LIBDWARF_DEST) --with-dyninst-lib=$(ABS_LIBRARY_DEST) --with-dyninst-include=$(ABS_INCLUDE_DEST); \
31    fi; \
32
33 clean:
34         cd $(PLATFORM); $(MAKE) clean;
35
36 distclean:
37         rm -rf $(PLATFORM)
38
39 install:
40         cd $(PLATFORM); $(MAKE) install;