summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/xmltohb/makefile
blob: b6234fc6043cba6e1b5b9aeaabc0d746501e748c (plain)
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
#  IBM_PROLOG_BEGIN_TAG
#  This is an automatically generated prolog.
#
#  $Source: src/usr/targeting/makefile $
#
#  IBM CONFIDENTIAL
#
#  COPYRIGHT International Business Machines Corp. 2011
#
#  p1
#
#  Object Code Only (OCO) source materials
#  Licensed Internal Code Source Materials
#  IBM HostBoot Licensed Internal Code
#
#  The source code for this program is not published or other-
#  wise divested of its trade secrets, irrespective of what has
#  been deposited with the U.S. Copyright Office.
#
#  Origin: 30
#
#  IBM_PROLOG_END

ROOTPATH = ../../../..

XMLTOHB_HEADER_TARGETS =    \
    attributeenums.H        \
    attributestrings.H      \
    attributetraits.H       \
    attributestructs.H      \
    pnortargeting.H         \
    fapiplatattrmacros.H

XMLTOHB_SOURCE_TARGETS =    \
    attributestrings.C  

XMLTOHB_SYSTEM_BINARIES = \
   vbu_targeting.bin \
   simics_SALERNO_targeting.bin \
   simics_VENICE_targeting.bin 

XMLTOHB_TARGETS = \
    ${XMLTOHB_HEADER_TARGETS} \
    ${XMLTOHB_SOURCE_TARGETS} 

XMLTOHB_GENERIC_SOURCES = attribute_types.xml target_types.xml

XMLTOHB_FAPIATTR_SOURCES = \
    ${ROOTPATH}/src/usr/hwpf/hwp/fapiHwpAttributeInfo.xml

VMM_CONSTS_FILE = \
    ${ROOTPATH}/src/include/usr/vmmconst.h

GENFILES = ${XMLTOHB_TARGETS} 

EXTRA_PARTS = $(addprefix $(IMGDIR)/, $(XMLTOHB_SYSTEM_BINARIES))

EXTRA_CLEAN = $(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES}) \
	      $(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES:.bin=.xml}) \
              ${GENDIR}/generic.xml

include ${ROOTPATH}/config.mk

# Delete any generated file on error 
.DELETE_ON_ERROR:

${EXTRA_PARTS}: ${IMGDIR}/% : ${GENDIR}/%
	cp -f $^ $@

# generic XML is created from the generic sources only
${GENDIR}/generic.xml: ${XMLTOHB_GENERIC_SOURCES}
	./mergexml.sh $^ > $@

# create the header files, only needs generic xml
$(call GENTARGET,$(XMLTOHB_TARGETS)) : \
		xmltohb.pl ${GENDIR}/generic.xml ${XMLTOHB_FAPIATTR_SOURCES}
	./$< $(addprefix --hb-xml-file=,${GENDIR}/generic.xml) \
	     $(addprefix --fapi-attributes-xml-file=,\
			 ${XMLTOHB_FAPIATTR_SOURCES}) \
	     --src-output-dir=$(dir $@) --img-output-dir=none \
	     --img-output-file=none

# system-specific XML needs the generic plus the xxx.system.xml file
${GENDIR}/%.hb.xml: %.system.xml ${XMLTOHB_GENERIC_SOURCES}
	./mergexml.sh $^ > $@

# create the binary files
${GENDIR}/%_targeting.bin: xmltohb.pl ${GENDIR}/%.hb.xml ${XMLTOHB_FAPIATTR_SOURCES} ${VMM_CONSTS_FILE}
	./$< $(addprefix --hb-xml-file=,${GENDIR}/$*.hb.xml) \
	     $(addprefix --fapi-attributes-xml-file=,\
			 ${XMLTOHB_FAPIATTR_SOURCES}) \
	     --src-output-dir=none --img-output-dir=$(dir $@) \
	     --img-output-file=$(notdir $@) \
         --vmm-consts-file=$(VMM_CONSTS_FILE)




OpenPOWER on IntegriCloud