1
1
# ##############################################################################
2
2
#
3
- # (c) Copyright IBM Corp. 2015, 2016
3
+ # (c) Copyright IBM Corp. 2015, 2017
4
4
#
5
5
# This program and the accompanying materials are made available
6
6
# under the terms of the Eclipse Public License v1.0 and
16
16
# Multiple authors (IBM Corp.) - initial implementation and documentation
17
17
# ##############################################################################
18
18
19
- top_srcdir := ../..
20
- VPATH := ../..
21
- include $(top_srcdir ) /tools/toolconfigure.mk
19
+ top_srcdir := ..
20
+ include $(top_srcdir ) /omrmakefiles/configure.mk
22
21
23
22
.DEFAULT_GOAL := all
24
23
24
+ OMR_TOOLCHAIN ?= gcc
25
+
25
26
ifneq (,$(filter gcc xlc,$(OMR_TOOLCHAIN ) ) )
26
27
DEBUG_FORMAT = dwo
27
28
else ifeq (msvc,$(OMR_TOOLCHAIN))
@@ -34,32 +35,42 @@ endif
34
35
export DEBUG_FORMAT
35
36
36
37
targets = \
37
- src/intermediate_representation \
38
- src/macros \
39
- src/cmdline_tool \
40
- src/blob_reader \
41
- src/blob_generation/java \
42
- test
43
-
44
- ifneq (,$(findstring pdb,$(DEBUG_FORMAT ) ) )
45
- targets += src/scanners/pdb
46
- src/cmdline_tool : src/scanners/pdb src/intermediate_representation src/macros src/blob_generation/java
47
- endif
48
-
49
- ifneq (,$(findstring dwo,$(DEBUG_FORMAT ) ) )
50
- targets += src/scanners/dwarf
51
- src/cmdline_tool : src/scanners/dwarf src/intermediate_representation src/macros src/blob_generation/java
52
- endif
38
+ lib \
39
+ test \
40
+ tools
53
41
54
42
all : $(targets )
55
43
56
44
$(targets ) :
57
45
$(MAKE ) -C $@ all
58
46
.PHONY : $(targets )
59
47
48
+ tools : lib
49
+ test : tools lib
50
+
60
51
targets_clean := $(addsuffix _clean,$(targets ) )
61
52
clean : $(targets_clean )
62
53
$(targets_clean ) ::
63
54
$(MAKE ) -C $(patsubst % _clean,% ,$@ ) clean
64
55
.PHONY : $(targets_clean )
65
56
57
+ # ## TODO: What is this gross magic?
58
+ ifeq (0,1)
59
+ # omr_srcdir = path to top of OMR source tree
60
+ omr_srcdir ?= $(ddrgen_topdir ) /../..
61
+
62
+ # ddrgen_topdir = path to top of DDR source tree
63
+ ddrgen_srcdir = $(ddrgen_topdir ) /src
64
+
65
+ # set top_srcdir as required by omr makefiles
66
+ top_srcdir = $(abspath $(omr_srcdir ) )
67
+ include $(top_srcdir ) /omrmakefiles/configure.mk
68
+
69
+ ifeq (gcc,$(OMR_TOOLCHAIN))
70
+ # ddrgen uses rtti
71
+ MODULE_CXXFLAGS += -frtti -D__STDC_LIMIT_MACROS -std=c++0x
72
+ endif
73
+ ifeq (msvc,$(OMR_TOOLCHAIN))
74
+ MODULE_CXXFLAGS += /EHsc
75
+ endif
76
+ endif
0 commit comments