summaryrefslogtreecommitdiffstats
path: root/src/Makefile
blob: d90b2f01191bdaeb8d56539137d39a70bbdb3308 (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

ifndef ROOTPATH
ROOTPATH = $(shell pwd)
export OCCROOT = $(ROOTPATH)
endif

#*******************************************************************************
# mk variable Declaration
#*******************************************************************************
SUBDIRS = tracepp occBootLoader occ occApplet
COMBINE_IMAGE_SUBDIRS = occBootLoader occ occApplet
CLEAN_SUBDIRS = occBootLoader occ occApplet ssx/pgp lib
CLEANCMD = $(MAKE) clean -C $(dir)
ALLCMD = $(MAKE) -C $(dir)
COMBINEIMAGE = $(MAKE) combineImage -C $(dir)
IMAGEFILE = image.bin

export TRACEPP = $(ROOTPATH)/tracepp/tracepp
TRACEHASH = $(ROOTPATH)/tracepp/tracehash.pl

#*******************************************************************************
# Compilation 
#*******************************************************************************
all:
	$(foreach dir,$(SUBDIRS),$(ALLCMD) &&) true

#*******************************************************************************
# Combine Objects/Executables into OCC Image
#*******************************************************************************
.PHONY : combineImage
combineImage:
	 rm -rf $(IMAGEFILE)
	 $(foreach dir,$(COMBINE_IMAGE_SUBDIRS),$(COMBINEIMAGE) &&) true

#*******************************************************************************
# Create lid or ruhx out of OCC Image
#*******************************************************************************
.PHONY : 81e004%.ruhx
81e004%.ruhx:
	occgenlid.pl -i ${IMAGEFILE} -l $(basename $@)

.PHONY : 81e004%.lid
81e004%.lid:
	cp ${IMAGEFILE} $(dir $(IMAGEFILE))/$@

#*******************************************************************************
# Create occStringFile
#*******************************************************************************
# FIXME depending on where .o files end up
.PHONY : tracehash
tracehash:
	$(TRACEHASH) -c -d . -s $(ROOTPATH)/occStringFile

#*******************************************************************************
# Create occcSrcParse.C
#*******************************************************************************
# FIXME error log parser plugins not relevant to OpenPOWER, tool location unknown
.PHONY : srcPluginFile
srcPluginFile:
	scanforsrcs.pl

#*******************************************************************************
# Clean
#*******************************************************************************
clean: 
	$(foreach dir,$(CLEAN_SUBDIRS),$(CLEANCMD) &&) true
	rm -rf image.bin
	
OpenPOWER on IntegriCloud